magicka 0.5.3 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 790574b274384507133ba81bff57316fdee267695e6a86bbb36da2065d98f918
4
- data.tar.gz: ded516626da7b9825e1711aa4d299cd0388de7293776cc20c9facc607b4ba8ef
3
+ metadata.gz: 89c43463111b2c2105250a275a53b80861b06ad90881585c2928174728931567
4
+ data.tar.gz: 4c9f0a23503fc925cd60657706797e37596ae6e11b8e6d78c2e082124a0cbc78
5
5
  SHA512:
6
- metadata.gz: a2fb23dfa2dca070216bede19831ca54bc0c9ee1340418848e647512d4ec7668ee97b0015aa8d7d3b85e6014883e263107ce8360efed4286342e714f502d93ce
7
- data.tar.gz: 6e165bd37c83eb5d3c0c760164f2f93e9d51d05f284621960012e24b81d5b7779140cca6f1d47128bd24a4545201e77becd489fa20d9e0ac6ba816cd01dc8fdf
6
+ metadata.gz: ce20ae0d689c937f5c414288eeb493c3438c1f592f557286747fd9879c742288391a7cf619def37cfbb9d02a059572b77a1c13841ee34a8ae7d92536d7c58786
7
+ data.tar.gz: c665834d06f7ab392b350045279d062a3fdb6f66e008907c22cf0a221eed8b4c5af353a93501fabf156d19837984351f12b16c55c4def4b79dbb69f7b40f10a2
data/.circleci/config.yml CHANGED
@@ -22,7 +22,7 @@ workflows:
22
22
  jobs:
23
23
  test:
24
24
  docker:
25
- - image: darthjee/circleci_rails_gems:0.6.0
25
+ - image: darthjee/circleci_rails_gems:0.7.0
26
26
  environment:
27
27
  PROJECT: magicka
28
28
  steps:
@@ -41,7 +41,7 @@ jobs:
41
41
  command: cc-test-reporter after-build --exit-code $?
42
42
  checks:
43
43
  docker:
44
- - image: darthjee/circleci_rails_gems:0.6.0
44
+ - image: darthjee/circleci_rails_gems:0.7.0
45
45
  environment:
46
46
  PROJECT: magicka
47
47
  steps:
@@ -66,7 +66,7 @@ jobs:
66
66
  command: check_specs
67
67
  build-and-release:
68
68
  docker:
69
- - image: darthjee/circleci_rails_gems:0.5.4
69
+ - image: darthjee/circleci_rails_gems:0.7.0
70
70
  environment:
71
71
  PROJECT: magicka
72
72
  steps:
data/.rubocop.yml CHANGED
@@ -32,7 +32,7 @@ RSpec/MultipleExpectations:
32
32
  - 'spec/integration/readme/**/*_spec.rb'
33
33
 
34
34
  RSpec/NestedGroups:
35
- Max: 4
35
+ Max: 5
36
36
  Exclude:
37
37
  - 'spec/integration/yard/**/*.rb'
38
38
 
data/Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
1
  FROM darthjee/scripts:0.1.8 as scripts
2
2
 
3
- FROM darthjee/rails_gems:0.6.0 as base
3
+ FROM darthjee/rails_gems:0.7.0 as base
4
4
 
5
5
  COPY --chown=app:app ./ /home/app/app/
6
6
 
data/README.md CHANGED
@@ -9,20 +9,23 @@ Magicka
9
9
 
10
10
  ![magicka](https://raw.githubusercontent.com/darthjee/magicka/master/magicka.jpg)
11
11
 
12
+ Magica helps creating html templates for forms and display data using js applications
13
+ such as AngulaJS
14
+
12
15
  Yard Documentation
13
16
  -------------------
14
- [https://www.rubydoc.info/gems/magicka/0.5.3](https://www.rubydoc.info/gems/magicka/0.5.3)
17
+ [https://www.rubydoc.info/gems/magicka/0.6.0](https://www.rubydoc.info/gems/magicka/0.6.0)
15
18
 
16
19
  Installation
17
20
  ---------------
18
21
 
19
- - Install it
22
+ - Install it
20
23
 
21
24
  ```ruby
22
25
  gem install magicka
23
26
  ```
24
27
 
25
- - Or add Magicka to your `Gemfile` and `bundle install`:
28
+ - Or add Magicka to your `Gemfile` and `bundle install`:
26
29
 
27
30
  ```ruby
28
31
  gem 'magicka'
@@ -31,3 +34,76 @@ Installation
31
34
  ```bash
32
35
  bundle install magicka
33
36
  ```
37
+
38
+ ## Usage
39
+ Magicka is used as a helper for erb coding so that each element is paired with an
40
+ element class, a template and a method in an aggregator.
41
+
42
+ Different aggregators have the same method so that they render the same `element` in
43
+ different ways
44
+
45
+ ### example
46
+ ```html.erb
47
+ <!-- new.html.erb -->
48
+
49
+ <% magicka_form('controller.person') do |form| %>
50
+ <%= render partial: 'person_form', locals: { form: form } %>
51
+ <% end %>
52
+ ```
53
+
54
+ ```html.erb
55
+ <!-- show.html.erb -->
56
+
57
+ <% magicka_display('controller.person') do |form| %>
58
+ <%= render partial: 'person_form', locals: { form: form } %>
59
+ <% end %>
60
+ ```
61
+
62
+ ```html.erb
63
+ <!-- _person_form.html.erb -->
64
+
65
+ <%= form.input(:first_name) %>
66
+ <%= form.input(:last_name) %>
67
+ <%= form.input(:age) %>
68
+ <%= form.select(:gender, options: %w[MALE FEMALE] %>
69
+
70
+ <%= form.only(:form) do %>
71
+ <!-- this block only appears in a form -->
72
+ <%= form.button(ng_click: 'controller.save', text: 'Save') %>
73
+ <% end %>
74
+ ```
75
+
76
+ ## Configuring
77
+ In order to use magicka, the helper has to added to the controllers and any custom
78
+ element needs to added
79
+
80
+ `app/controllers/application_controller.rb`
81
+ ```ruby
82
+ class ApplicationController < ActionController::Base
83
+ helper Magicka::Helper
84
+ end
85
+ ```
86
+
87
+ ### Including custom elements
88
+
89
+ Elements can be included by defining attributes that they can be initialized with
90
+ and that can be passed to the template
91
+
92
+ `config/initializers/magicka.rb`
93
+ ```ruby
94
+ module Magicka
95
+ class MyTextInput < Magicka::Element
96
+ with_attribute_locals :label, :field, :id
97
+ end
98
+ end
99
+
100
+ Magicka::Form.with_element(Magicka::MyTextInput)
101
+ ```
102
+
103
+ `templates/form/_my_text_input.html.erb`
104
+ ```html.erb
105
+ <div>
106
+ <label for="<%= field %>"><%= label %></label>
107
+ <input type="text" id="<%= id %>" name="field" />
108
+ </div>
109
+ ```
@@ -1,6 +1,7 @@
1
1
  ignore:
2
2
  - lib/magicka/version.rb
3
3
  - lib/magicka.rb
4
- - lib/magicka/aggregator.rb
4
+ - lib/magicka/aggregator/class_methods.rb
5
5
  - lib/magicka/aggregator/method_builder.rb
6
- - lib/magicka/helper.rb
6
+ - lib/magicka/helper/class_methods.rb
7
+ - lib/magicka/helper/method_builder.rb
data/config/yardstick.yml CHANGED
@@ -1,4 +1,4 @@
1
- threshold: 84.2
1
+ threshold: 90.0
2
2
  require_exact_threshold: false
3
3
  rules:
4
4
  ApiTag::Presence:
@@ -23,6 +23,8 @@ rules:
23
23
  enabled: true
24
24
  exclude:
25
25
  - Magicka::Element#initialize
26
+ - Magicka::Aggregator#initialize
27
+ - Magicka::Aggregator::MethodBuilder#initialize
26
28
  Summary::Length:
27
29
  enabled: true
28
30
  exclude: []
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Magicka
4
+ class Aggregator
5
+ # Class methods for {Magicka::Aggregator}
6
+ module ClassMethods
7
+ # (see Aggregator.with_element)
8
+ def with_element(element_class, method_name = nil, template: nil)
9
+ MethodBuilder
10
+ .new(self, element_class, method_name, template: template)
11
+ .prepare
12
+ .build
13
+ end
14
+
15
+ # Set and return the type of the aggregator
16
+ #
17
+ # When new_type is ommited, returns the last value
18
+ #
19
+ # @param new_type [Symbol,String] The value to be set
20
+ #
21
+ # @return [Symbol] the type of the aggregator
22
+ def type(new_type = nil)
23
+ return @type ||= default_type unless new_type
24
+
25
+ @type = new_type.to_sym
26
+ end
27
+
28
+ private
29
+
30
+ # @private
31
+ # @api private
32
+ #
33
+ # Default type when type is not defined
34
+ #
35
+ # Default type is extracted from class name
36
+ #
37
+ # @return [Symbol]
38
+ def default_type
39
+ name&.demodulize&.underscore&.to_sym
40
+ end
41
+ end
42
+ end
43
+ end
@@ -6,19 +6,33 @@ module Magicka
6
6
  #
7
7
  # Class responsible for building an {Aggregator} method
8
8
  class MethodBuilder < Sinclair
9
- def initialize(klass, element_class, method_name = nil)
9
+ # @param klass [Class.new<Aggregator>]
10
+ # Aggragator class to receive the method
11
+ # @param element_class [Class<Magicka::ELement>]
12
+ # Class of the element to be rendered
13
+ # @param method_name [String,Symbol]
14
+ # Name of the method that will render the element
15
+ # @param template [String] custom template file to be used
16
+ def initialize(klass, element_class, method_name = nil, template: nil)
10
17
  super(klass)
11
18
 
12
19
  @element_class = element_class
13
20
  @method_name = method_name
21
+ @template = template
14
22
  end
15
23
 
24
+ # Prepare methods to be built
25
+ #
26
+ # @return [Aggregator::MethodBuilder] return self
16
27
  def prepare
17
28
  element_klass = element_class
29
+ template_file = template
18
30
 
19
31
  add_method(method_name) do |field, model: self.model, **args|
20
32
  element_klass.render(
21
- renderer: renderer, field: field, model: model, **args
33
+ renderer: renderer, field: field,
34
+ model: model, template: template_file,
35
+ **args
22
36
  )
23
37
  end
24
38
 
@@ -27,8 +41,29 @@ module Magicka
27
41
 
28
42
  private
29
43
 
30
- attr_reader :element_class
44
+ attr_reader :element_class, :template
45
+ # @method element_class
46
+ # @api private
47
+ # @private
48
+ #
49
+ # Class of the element to be rendered by the method
50
+ #
51
+ # @return [Class<Magicka::Element>]
31
52
 
53
+ # @method template
54
+ # @api private
55
+ # @private
56
+ #
57
+ # template file
58
+ #
59
+ # @return [String]
60
+
61
+ # name of the method to be generated
62
+ #
63
+ # When the method name was not supplied in the constructor,
64
+ # it is infered from {#element_class}
65
+ #
66
+ # @return [String,Symbol]
32
67
  def method_name
33
68
  @method_name ||= element_class
34
69
  .name
@@ -6,29 +6,86 @@ module Magicka
6
6
  # Class representing an element agregator, representing a model
7
7
  class Aggregator
8
8
  autoload :MethodBuilder, 'magicka/aggregator/method_builder'
9
+ autoload :ClassMethods, 'magicka/aggregator/class_methods'
9
10
 
10
11
  class << self
11
- def with_element(element_class, method_name = nil)
12
- MethodBuilder
13
- .new(self, element_class, method_name)
14
- .prepare
15
- .build
16
- end
12
+ include Aggregator::ClassMethods
17
13
  end
18
14
 
19
15
  attr_reader :model
16
+ # @method model
17
+ # @api public
18
+ #
19
+ # Model where the form elements will focus
20
+ #
21
+ # @return [String]
20
22
 
23
+ # @method self.with_element(element_class, method_name = nil, template: nil)
24
+ #
25
+ # Configure an {Aggregator} adding a method to render an element
26
+ #
27
+ # @param element_class [Class<Magicka::ELement>]
28
+ # Class of the element to be rendered
29
+ # @param method_name [String,Symbol]
30
+ # Name of the method that will render the element
31
+ # @param template [String] custom template file to be used
32
+ #
33
+ # @see Aggregator::ClassMethods#with_element
34
+ # @see Aggregator::MethodBuilder
35
+ #
36
+ # @return [Array<NilClass>]
37
+
38
+ # @param renderer [ActionView::Base] Object responsible for rendering
39
+ # @param model [String] Model where the form elements will focus
21
40
  def initialize(renderer, model)
22
41
  @renderer = renderer
23
42
  @model = model
24
43
  end
25
44
 
45
+ # Returns a new aggregator focusing on a new model
46
+ #
47
+ # The new model is an attribute of +model+ unless base is given
48
+ #
49
+ # @param model [String] Model where the form elements will focus
50
+ # @param base [String] Model base
51
+ #
52
+ # @yield [Aggregator] new aggregator focused in the new model
53
+ #
54
+ # @return [Aggregator]
26
55
  def with_model(model, base: self.model)
27
56
  new_model = [base, model].compact.join('.')
28
57
 
29
58
  yield self.class.new(renderer, new_model)
30
59
  end
31
60
 
61
+ # Executes a block only when aggregator is one of given types
62
+ #
63
+ # @param types [Array<Symbol>] posssible types
64
+ #
65
+ # @return [Object] Result of the block
66
+ def only(*types)
67
+ return unless types.include?(self.class.type)
68
+
69
+ yield
70
+ end
71
+
72
+ # Executes a block only when aggregator is not one of given types
73
+ #
74
+ # @param types [Array<Symbol>] posssible types
75
+ #
76
+ # @return [Object] Result of the block
77
+ def except(*types)
78
+ return if types.include?(self.class.type)
79
+
80
+ yield
81
+ end
82
+
83
+ # @api private
84
+ # Checks if other aggragate is equal to this one
85
+ #
86
+ # @param [Object] other object to be compared
87
+ #
88
+ # @return [TrueClass,FalseClass]
32
89
  def equal?(other)
33
90
  return unless other.class == self.class
34
91
 
@@ -41,6 +98,13 @@ module Magicka
41
98
  protected
42
99
 
43
100
  attr_reader :renderer
101
+ # @method renderer
102
+ # @private
103
+ # @api private
104
+ #
105
+ # Returns the element needed to render the view
106
+ #
107
+ # @return [ActionView::Base]
44
108
 
45
109
  delegate :render, to: :renderer
46
110
  end
@@ -1,11 +1,43 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Magicka
4
+ # @api public
5
+ #
4
6
  # Class responsible for controlling one object display
5
7
  class Display < Aggregator
6
8
  with_element(Text, :input)
7
9
  with_element(Text, :select)
8
10
 
11
+ # Noop
12
+ #
13
+ # Used to not render a button when using
14
+ # display and not form
15
+ #
16
+ # #return [NilClass]
9
17
  def button(**_args); end
18
+
19
+ # @method input(field, model: self.model, **options)
20
+ # @api public
21
+ #
22
+ # @param field [String,Symbol] field to be shown
23
+ # @param model [String] model being rendered
24
+ # (when omited, use the aggregator model)
25
+ # @param options [Hash]
26
+ #
27
+ # @see Magicka::Text
28
+ #
29
+ # @return (see Magicka::Element#render)
30
+
31
+ # @method select(field, model: self.model, **options)
32
+ # @api public
33
+ #
34
+ # @param field [String,Symbol] field to be shown
35
+ # @param model [String] model being rendered
36
+ # (when omited, use the aggregator model)
37
+ # @param options [Hash]
38
+ #
39
+ # @see Magicka::Text
40
+ #
41
+ # @return (see Magicka::Element#render)
10
42
  end
11
43
  end
@@ -14,7 +14,7 @@ module Magicka
14
14
  #
15
15
  # @return [Array<Sinclair::MethodDefinition>]
16
16
  def add_template(template)
17
- add_method(:template) do
17
+ add_method(:template, cached: true) do
18
18
  template
19
19
  end
20
20
 
@@ -25,7 +25,7 @@ module Magicka
25
25
  #
26
26
  # The method will always return the template folder given in the params
27
27
  #
28
- # @param template_folder [String] path to template folder
28
+ # @param folder [String] path to template folder
29
29
  #
30
30
  # @return [Array<Sinclair::MethodDefinition>]
31
31
  def add_template_folder(folder)
@@ -33,6 +33,9 @@ module Magicka
33
33
  # @return [Array]
34
34
 
35
35
  # Render element HTML
36
+ # @api private
37
+ #
38
+ # @return [ActionView::OutputBuffer]
36
39
  def render
37
40
  renderer.render partial: template, locals: locals
38
41
  end
@@ -77,8 +80,11 @@ module Magicka
77
80
  #
78
81
  # @return [String]
79
82
  def template
80
- self.class.name.underscore
81
- .gsub(%r{^.*/}, "#{template_folder}/")
83
+ @template ||= self
84
+ .class
85
+ .name
86
+ .underscore
87
+ .gsub(%r{^.*/}, "#{template_folder}/")
82
88
  end
83
89
  end
84
90
  end
data/lib/magicka/form.rb CHANGED
@@ -6,8 +6,35 @@ module Magicka
6
6
  with_element(Input)
7
7
  with_element(Select)
8
8
 
9
+ # Renders a button
10
+ #
11
+ # @return (see Magicka::Element#render)
9
12
  def button(**args)
10
13
  Button.render(renderer: renderer, **args)
11
14
  end
15
+
16
+ # @method input(field, model: self.model, **options)
17
+ # @api public
18
+ #
19
+ # @param field [String,Symbol] field to be shown
20
+ # @param model [String] model being rendered
21
+ # (when omited, use the aggregator model)
22
+ # @param options [Hash]
23
+ #
24
+ # @see Magicka::Input
25
+ #
26
+ # @return (see Magicka::Element#render)
27
+
28
+ # @method select(field, model: self.model, **options)
29
+ # @api public
30
+ #
31
+ # @param field [String,Symbol] field to be shown
32
+ # @param model [String] model being rendered
33
+ # (when omited, use the aggregator model)
34
+ # @param options [Hash]
35
+ #
36
+ # @see Magicka::Select
37
+ #
38
+ # @return (see Magicka::Element#render)
12
39
  end
13
40
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Magicka
4
+ module Helper
5
+ # Class methods for {Magicka::Helper}
6
+ module ClassMethods
7
+ # (see Magicka::Helper.with)
8
+ def with(aggregator_class, type = aggregator_class.type)
9
+ MethodBuilder.new(self).build_aggregator(aggregator_class, type)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Magicka
4
+ module Helper
5
+ # Builds methods for {Magicka::Helper}
6
+ class MethodBuilder < Sinclair
7
+ # (see Magicka::Helper.with)
8
+ def build_aggregator(aggregator_class, type = aggregator_class.type)
9
+ add_method("magicka_#{type}") do |model, &block|
10
+ block.call(aggregator_class.new(self, model))
11
+ end
12
+
13
+ build
14
+ end
15
+ end
16
+ end
17
+ end
@@ -3,12 +3,55 @@
3
3
  module Magicka
4
4
  # Helper module to be used on rails
5
5
  module Helper
6
- def magicka_form(model)
7
- yield Form.new(self, model)
8
- end
6
+ autoload :ClassMethods, 'magicka/helper/class_methods'
7
+ autoload :MethodBuilder, 'magicka/helper/method_builder'
9
8
 
10
- def magicka_display(model)
11
- yield Display.new(self, model)
9
+ class << self
10
+ include Helper::ClassMethods
12
11
  end
12
+
13
+ with Form
14
+ with Display
15
+
16
+ # @method self.with(aggregator_class, type = aggregator_class.type)
17
+ #
18
+ # Adds a helper method magicka_+type+
19
+ #
20
+ # The created method executes a block with a an aggragator
21
+ #
22
+ # @param aggregator_class [Class<Magicka::Aggregator>]
23
+ # Agragator to be initialized
24
+ # @param type [String,Symbol] type of aggregator,
25
+ # this will define the method name
26
+ #
27
+ # @return [Array<NilClass>]
28
+
29
+ # @method magicka_form(model)
30
+ #
31
+ # Execute a block with an aggregator focused on a model
32
+ #
33
+ # The aggregator renders elements as form elements
34
+ #
35
+ # @param model [String] Model to be processed
36
+ #
37
+ # @yield [Magicka::Form] Agregator to edit a model
38
+ #
39
+ # @see Magicka::Form
40
+ #
41
+ # @return [String]
42
+
43
+ # @method magicka_display(model)
44
+ #
45
+ # Execute a block with an aggregator focused on a model
46
+ #
47
+ # The aggregator renders elements as display elements
48
+ #
49
+ # @param model [String] Model to be processed
50
+ #
51
+ # @yield [Magicka::Display] Agregator to show a model
52
+ #
53
+ # @see Magicka::Display
54
+ #
55
+ # @return [String]
13
56
  end
14
57
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Magicka
4
- VERSION = '0.5.3'
4
+ VERSION = '0.6.0'
5
5
  end
data/magicka.gemspec CHANGED
@@ -19,31 +19,31 @@ Gem::Specification.new do |gem|
19
19
  gem.test_files = gem.files.grep(%r{^(test|gem|features)/})
20
20
  gem.require_paths = ['lib']
21
21
 
22
- gem.add_runtime_dependency 'activesupport', '~> 5.2.4.3'
22
+ gem.add_runtime_dependency 'activesupport', '~> 5.2.x'
23
23
  gem.add_runtime_dependency 'sinclair', '>= 1.6.7'
24
24
 
25
- gem.add_development_dependency 'actionpack', '5.2.4.3'
26
- gem.add_development_dependency 'activerecord', '5.2.4.3'
25
+ gem.add_development_dependency 'actionpack', '~> 5.2.x'
26
+ gem.add_development_dependency 'activerecord', '~> 5.2.x'
27
27
  gem.add_development_dependency 'bundler', '1.16.1'
28
28
  gem.add_development_dependency 'factory_bot', '5.2.0'
29
- gem.add_development_dependency 'nokogiri', '1.10.9'
29
+ gem.add_development_dependency 'nokogiri', '1.12.5'
30
30
  gem.add_development_dependency 'pry', '0.12.2'
31
31
  gem.add_development_dependency 'pry-nav', '0.3.0'
32
- gem.add_development_dependency 'rails', '5.2.4.3'
32
+ gem.add_development_dependency 'rails', '~> 5.2.x'
33
33
  gem.add_development_dependency 'rails-controller-testing', '1.0.4'
34
34
  gem.add_development_dependency 'rake', '13.0.1'
35
- gem.add_development_dependency 'reek', '5.6.0'
35
+ gem.add_development_dependency 'reek', '6.0.3'
36
36
  gem.add_development_dependency 'rspec', '3.9.0'
37
- gem.add_development_dependency 'rspec-core', '3.9.1'
38
- gem.add_development_dependency 'rspec-expectations', '3.9.1'
37
+ gem.add_development_dependency 'rspec-core', '3.9.3'
38
+ gem.add_development_dependency 'rspec-expectations', '3.9.4'
39
39
  gem.add_development_dependency 'rspec-mocks', '3.9.1'
40
- gem.add_development_dependency 'rspec-rails', '3.9.0'
41
- gem.add_development_dependency 'rspec-support', '3.9.2'
40
+ gem.add_development_dependency 'rspec-rails', '3.9.1'
41
+ gem.add_development_dependency 'rspec-support', '3.9.4'
42
42
  gem.add_development_dependency 'rubocop', '0.80.1'
43
43
  gem.add_development_dependency 'rubocop-rspec', '1.38.1'
44
- gem.add_development_dependency 'rubycritic', '4.4.1'
44
+ gem.add_development_dependency 'rubycritic', '4.6.1'
45
45
  gem.add_development_dependency 'simplecov', '0.17.1'
46
46
  gem.add_development_dependency 'sqlite3', '1.4.2'
47
- gem.add_development_dependency 'yard', '0.9.24'
47
+ gem.add_development_dependency 'yard', '0.9.26'
48
48
  gem.add_development_dependency 'yardstick', '0.9.9'
49
49
  end