From 71a6fab76f75840589ef2a177162a599450e8874 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Mon, 4 Apr 2016 11:17:32 -0400 Subject: [PATCH] deps: upgrade cairo, remove ruby <= 2.1 --- CHANGELOG.md | 3 +++ Rakefile | 2 -- docs/guides/getting-started/part_1_zero_to_game.rst | 8 +++----- docs/install.rst | 4 +++- squib.gemspec | 5 ++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ff24eb..de5010f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ Chores: * Switched to `require_relative` internally throughout the codebase to be more pry-friendly (#130) * Rewrote the entire API doc and placed it on [squib.readthedocs.org](http://squib.readthedocs.org). :tada: +Compatibility: +* Upgraded Cairo from 1.14.3 to 1.15.2. With this change, Squib no longer supports Ruby <= 2.1. + ## v0.9.0 / 2016-01-10 Features: diff --git a/Rakefile b/Rakefile index 72b6063..e6624d7 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,5 @@ require 'bundler/gem_tasks' require 'rspec/core/rake_task' -require 'yard' require 'benchmark' # require 'byebug' @@ -19,7 +18,6 @@ task :run, [:file] => :install do |t, args| end end - RSpec::Core::RakeTask.new(:spec) RSpec::Core::RakeTask.new(:spec_fastonly) do |t| diff --git a/docs/guides/getting-started/part_1_zero_to_game.rst b/docs/guides/getting-started/part_1_zero_to_game.rst index 076aac6..7338822 100644 --- a/docs/guides/getting-started/part_1_zero_to_game.rst +++ b/docs/guides/getting-started/part_1_zero_to_game.rst @@ -99,9 +99,9 @@ By the way, this is what's created: Now let's incrementally convert the above snippet into just one of our cards. Let's just focus on one card for now. Later we'll hook it up to our CSV and apply that to all of our cards. -You may have seen in some examples that we can just put in x-y coordinates into our DSL method calls (e.g. ``text x: 0, y: 100``). That's great for customizing our work later, but we want to get this to the table quickly. Instead, let's make use of Squib's **layout** feature (see :doc:`/layouts`). +You may have seen in some examples that we can just put in x-y coordinates into our DSL method calls (e.g. ``text x: 0, y: 100``). That's great for customizing our work later, but we want to get this to the table quickly. Instead, let's make use of Squib's feature (see :doc:`/layouts`). -Layouts are a way of specifying some of your arguments in one place - in a layout file! The ``squib new`` command created our own ``layout.yml`` file, but we can also use one of Squib's built-in layout files. Since we just need a title, artwork, and description, we can just use ``economy.yml`` (inspired by a popular deck builder that currently has *dominion* over the genre). Here's how that looks: +Layouts are a way of specifying some of your arguments in one place - a layout file. The ``squib new`` command created our own ``layout.yml`` file, but we can also use one of Squib's built-in layout files. Since we just need a title, artwork, and description, we can just use ``economy.yml`` (inspired by a popular deck builder that currently has *dominion* over the genre). Here's how that looks: .. raw:: html @@ -119,7 +119,7 @@ There are a few key decisions I've made here: * **Black-and-white**. We're now only using black or white so that we can be printer-friendly. * **Safe and Cut**. We added two rectangles for guides based on the poker card template from `TheGameCrafter.com `_. This is important to do now and not later. In most print-on-demand templates, we have a 1/8-inch border that is larger than what is to be used, and will be cut down (called a *bleed*). Rather than have to change all our coordinates later, let's build that right into our prototype. Squib can trim around these bleeds for things like :doc:`/dsl/showcase`, :doc:`/dsl/hand`, :doc:`/dsl/save_sheet`, :doc:`/dsl/save_png`, and :doc:`/dsl/save_pdf`. See :doc:`/bleed`. - * **Title**. We added a title based on our data - hardcoded since we're just tlaking about one card for now. + * **Title**. We added a title based on our data. * **layout: 'foo'**. Each command references a "layout" rule. These can be seen in our layout file, which is a built-in layout called ``economy.yml`` (see `ours on GitHub `_ ). Later on, we can define our own layout rules in our own file, but for now we just want to get our work done as fast as possible and make use of the stock layout. See :doc:`/layouts`. Multiple Cards @@ -138,8 +138,6 @@ So technically, these two lines are equivalent:: text str: ['Zombie', 'Robot'], layout: 'title' text str: ['Zombie', 'Robot'], layout: ['title','title'] -This is key to understanding how Squib works. See :doc:`/arrays`. - Ok back to the game. We COULD just put our data into literal arrays. But that's considered bad programming practice (called *hardcoding*, where you put data directly into your code). Instead, let's make use of our CSV data file. What the ``csv`` command does here is read in our file and create a hash of arrays. Each array is a column in the table, and the header to the colum is the key to the hash. To see this in action, check it out on Ruby's interactive shell (``irb``):: diff --git a/docs/install.rst b/docs/install.rst index e5b681e..f6cc159 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -6,7 +6,9 @@ Squib is a Ruby gem, and installation is handled like most gems. Pre-requisites -------------- - * Ruby 2.0+ + * `Ruby 2.1+ `_ + +Squib works with both x86 and x86_64 versions of Ruby. Typical Install --------------- diff --git a/squib.gemspec b/squib.gemspec index b94de14..4a2c5d7 100644 --- a/squib.gemspec +++ b/squib.gemspec @@ -7,7 +7,7 @@ Gem::Specification.new do |spec| spec.specification_version = 2 if spec.respond_to? :specification_version= spec.required_rubygems_version = Gem::Requirement.new('>= 0') if spec.respond_to? :required_rubygems_version= spec.rubygems_version = '2.2.2' - spec.required_ruby_version = '>= 2.0.0' + spec.required_ruby_version = '>= 2.2.0' spec.name = 'squib' spec.version = Squib::VERSION @@ -27,7 +27,7 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(/^(test|spec|features)\//) spec.require_paths = ['lib'] - spec.add_runtime_dependency 'cairo', '~> 1.14.3' + spec.add_runtime_dependency 'cairo', '~> 1.15.2' spec.add_runtime_dependency 'pango', '~> 3.0.1' spec.add_runtime_dependency 'nokogiri', '~> 1.6.7' spec.add_runtime_dependency 'roo', '~> 2.3.0' @@ -40,7 +40,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3.3' spec.add_development_dependency 'redcarpet', '~> 3.1' spec.add_development_dependency 'github-markup', '~> 1.3' - spec.add_development_dependency 'yard', '~> 0.8' spec.add_development_dependency 'coveralls' # spec.add_development_dependency 'byebug' spec.add_development_dependency 'launchy'