catwalk 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 06d8ee7efa6c98b23c282422e6a7ee1200fae4c0
4
+ data.tar.gz: 22cce206786c4b50dc1a6d2772e7a357aa3178cb
5
+ SHA512:
6
+ metadata.gz: fe6997204cb44fd6d05762940cc97df296a651b59a1a8f52d52da57d5f41e2059c3722d34bbb4d416928f5fed757f2615676dad7d9e6cef94c3225035ad1814b
7
+ data.tar.gz: d9388b3f304a607ae2704ea8c14567c8ca18b8af2830ebb1dad35fbc38919d543dd8a5ca58dd0da5207a0c7a1cf3ed718f543f1bbdde5b82d09086a438b7ae0d
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig ADDED
Binary file
data/.travis.yml ADDED
@@ -0,0 +1,20 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ - 1.9.3
5
+ - 1.9.2
6
+
7
+ - rbx-19mode
8
+ - jruby-19mode
9
+ - ruby-head
10
+
11
+ - 1.8.7
12
+ - ree
13
+ - jruby-18mode
14
+ - rbx-18mode
15
+
16
+ matrix:
17
+ allow_failures:
18
+ - rvm: ruby-head
19
+ - rvm: jruby-18mode
20
+ - rvm: jruby-19mode
data/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # Catwalk
2
+ [![Build Status](https://secure.travis-ci.org/JonRowe/Catwalk.png)](http://travis-ci.org/JonRowe/Catwalk) [![Code Climate](https://codeclimate.com/github/JonRowe/Catwalk.png)](https://codeclimate.com/github/JonRowe/Catwalk)
3
+
4
+ Presenter gem library. See features for use.
5
+
6
+ ## Installation
7
+
8
+ Add this line to your application's Gemfile:
9
+
10
+ gem 'catwalk'
11
+
12
+ And then execute:
13
+
14
+ $ bundle
15
+
16
+ Or install it yourself as:
17
+
18
+ $ gem install catwalk
19
+
20
+ ## Usage
21
+
22
+ See features.
23
+
24
+ ## Contributing
25
+
26
+ 1. Fork it
27
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
28
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
29
+ 4. Push to the branch (`git push origin my-new-feature`)
30
+ 5. Create new Pull Request
data/Rakefile CHANGED
@@ -1,2 +1,18 @@
1
1
  require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
+
4
+ require 'rspec'
5
+ require 'rspec/core/rake_task'
6
+ require 'cucumber'
7
+ require 'cucumber/rake/task'
8
+
9
+
10
+
11
+ desc "Run specs"
12
+ RSpec::Core::RakeTask.new :spec
13
+
14
+ desc "Run integrations"
15
+ Cucumber::Rake::Task.new(:features) do |t|
16
+ t.cucumber_opts = "features --format pretty"
17
+ end
18
+ task :default => [:spec, :features]
data/catwalk.gemspec CHANGED
@@ -17,11 +17,10 @@ Gem::Specification.new do |s|
17
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
18
  s.require_paths = ["lib"]
19
19
 
20
+ s.add_development_dependency 'rake'
20
21
  s.add_development_dependency 'rspec'
21
22
  s.add_development_dependency 'cucumber'
22
- s.add_development_dependency 'ruby-debug19'
23
23
  s.add_development_dependency 'autotest-standalone'
24
- s.add_development_dependency 'autotest-fsevent' if RUBY_PLATFORM =~ /darwin/
25
24
 
26
25
  s.add_development_dependency 'activemodel'
27
26
  end
@@ -3,9 +3,22 @@ Feature: Active Model compatibility
3
3
  As a developer
4
4
  I wish to use catwalk to present my models whilst adhering to ActiveModel::Lint
5
5
 
6
+ @basic @model @active-model
6
7
  Scenario: Basic Active Model functionality
7
8
  Given I have an ActiveModel based model
8
- And I have a presenter class
9
- When I include Catwalk
10
- And I setup my presenter to represent my model
9
+ """
10
+ class MyActiveModel < ActiveModelExample
11
+ end
12
+ """
13
+ When I define a Catwalk presenter class for my model
14
+ """
15
+ class MyModelPresenter
16
+ include Catwalk::Presenter
17
+ end
18
+ """
19
+ When I set up my presenter for my model
20
+ """
21
+ @model = MyActiveModel.new
22
+ @presenter = MyModelPresenter.new @model
23
+ """
11
24
  Then my presenter should expose the models ActiveModel functionality
@@ -3,9 +3,25 @@ Feature: Presenting basic fields from an active model compatible model
3
3
  As a developer
4
4
  I want to wrap my models in a catwalk presenter
5
5
 
6
+ @basic @field
6
7
  Scenario: Basic usage
7
8
  Given I have an ActiveModel based model
8
- And my model has a attribute named "title"
9
- And I have a Catwalk presenter class for my model
10
- When I define a field "title"
9
+ """
10
+ class MyActiveModel < ActiveModelExample
11
+ attr_accessor :title
12
+ end
13
+ """
14
+ When I define a Catwalk presenter class for my model
15
+ """
16
+ class MyModelPresenter
17
+ include Catwalk::Presenter
18
+
19
+ field :title
20
+ end
21
+ """
22
+ When I set up my presenter for my model
23
+ """
24
+ @model = MyActiveModel.new
25
+ @presenter = MyModelPresenter.new @model
26
+ """
11
27
  Then my presenter should present "title" from my model
@@ -0,0 +1,40 @@
1
+ Feature: Field with default_when specified
2
+ In order to prevent undesirable effects
3
+ As a developer
4
+ I want to specify a check to be performed when I access a field
5
+
6
+ Background:
7
+ Given I have an ActiveModel based model
8
+ """
9
+ class MyActiveModel < ActiveModelExample
10
+ attr_accessor :title
11
+ end
12
+ """
13
+ When I define a Catwalk presenter class for my model
14
+ """
15
+ class MyModelPresenter
16
+ include Catwalk::Presenter
17
+
18
+ field :title, :default_when => :nil?
19
+ end
20
+ """
21
+
22
+ @default @field
23
+ Scenario: default_when specified
24
+ When I set up my presenter for my model
25
+ """
26
+ @model = MyActiveModel.new
27
+ @model.title = 'a value'
28
+ @presenter = MyModelPresenter.new @model
29
+ """
30
+ Then my presenter should present "title" from my model
31
+
32
+ @default @field @defaulted
33
+ Scenario: default_when specified, and criteria matched
34
+ When I set up my presenter for my model
35
+ """
36
+ @model = MyActiveModel.new
37
+ @presenter = MyModelPresenter.new @model
38
+ """
39
+ But my model's "title" attribute is nil
40
+ Then my presenter should present "title" as "Not Set"
@@ -0,0 +1,28 @@
1
+ Feature: Field with format block specified
2
+ In order to format a field in a custom fashion
3
+ As a developer
4
+ I want to use a lambda to format a field
5
+
6
+ @field @format @lambda
7
+ Scenario:
8
+ Given I have an ActiveModel based model
9
+ """
10
+ class MyActiveModel < ActiveModelExample
11
+ attr_accessor :title
12
+ end
13
+ """
14
+ When I define a Catwalk presenter class for my model
15
+ """
16
+ class MyModelPresenter
17
+ include Catwalk::Presenter
18
+
19
+ field :title, :format_with => lambda { |field| field.upcase }
20
+ end
21
+ """
22
+ When I set up my presenter for my model
23
+ """
24
+ @model = MyActiveModel.new
25
+ @model.title = 'all letters need to be uppercased'
26
+ @presenter = MyModelPresenter.new @model
27
+ """
28
+ Then my presenter should present "title" as "ALL LETTERS NEED TO BE UPPERCASED"
@@ -1,10 +1,27 @@
1
1
  Feature: Specifying model accessor
2
- In order to access the underlying model in my presenter methods
3
- As a developer
4
- I want to specify an accessor I will use to access the undelying model
2
+ In order to access the underlying model in my presenter methods
3
+ As a developer
4
+ I want to specify an accessor I will use to access the undelying model
5
5
 
6
- Scenario: Specifiying accessor
7
- Given I have an ActiveModel based model
8
- And I have a Catwalk presenter class for my model
9
- When I set access_as to "my_model"
10
- Then my presenter should expose the model via "my_model"
6
+ @model @access
7
+ Scenario: Specifiying accessor
8
+ Given I have an ActiveModel based model
9
+ """
10
+ class MyActiveModel < ActiveModelExample
11
+ attr_accessor :title
12
+ end
13
+ """
14
+ When I define a Catwalk presenter class for my model
15
+ """
16
+ class MyModelPresenter
17
+ include Catwalk::Presenter
18
+
19
+ access_as :my_model
20
+ end
21
+ """
22
+ When I set up my presenter for my model
23
+ """
24
+ @model = MyActiveModel.new
25
+ @presenter = MyModelPresenter.new @model
26
+ """
27
+ Then my presenter should expose the model via "my_model"
@@ -1,9 +1,7 @@
1
- Given "I have an ActiveModel based model" do
2
- @model = ActiveModelExample.new
1
+ Given "I have an ActiveModel based model" do |code|
2
+ eval code
3
3
  end
4
4
 
5
- Given /^my model has a attribute named "([^"]*)"$/ do |field_name|
6
- @model.class.class_eval do
7
- define_method(field_name) { "a value for checking later" }
8
- end
5
+ Given /^my model's "([^"]*)" attribute is nil$/ do |field_name|
6
+ @model.send(:"#{field_name}=", nil)
9
7
  end
@@ -0,0 +1,7 @@
1
+ Then /^my presenter should present "([^"]*)" from my model$/ do |field_name|
2
+ @presenter.send(field_name).should == @model.send(field_name)
3
+ end
4
+
5
+ Then /^my presenter should present "([^"]*)" as "([^"]*)"$/ do |field_name,value|
6
+ @presenter.send(field_name).should == value
7
+ end
@@ -1,31 +1,9 @@
1
- Given "I have a presenter class" do
2
- @presenter_klass = Class.new
1
+ When "I define a Catwalk presenter class for my model" do |code|
2
+ eval code
3
3
  end
4
4
 
5
- Given "I have a Catwalk presenter class for my model" do
6
- klass = Class.new
7
- klass.send :include, Catwalk::Presenter
8
- @presenter = klass.new @model
9
- end
10
-
11
- When "I include Catwalk" do
12
- @presenter_klass.send :include, Catwalk::Presenter
13
- end
14
-
15
- When "I setup my presenter to represent my model" do
16
- @presenter = @presenter_klass.new(@model)
17
- end
18
-
19
- When /^I define a field "([^"]*)"$/ do |field_name|
20
- @presenter.class.class_eval do
21
- field field_name
22
- end
23
- end
24
-
25
- When /^I set access_as to "([^"]*)"$/ do |accessor|
26
- @presenter.class.class_eval do
27
- access_as accessor
28
- end
5
+ When "I set up my presenter for my model" do |code|
6
+ eval code
29
7
  end
30
8
 
31
9
  Then "my presenter should expose the models ActiveModel functionality" do
@@ -37,10 +15,6 @@ Then "my presenter should expose the models ActiveModel functionality" do
37
15
  @presenter.to_model.should == @model
38
16
  end
39
17
 
40
- Then /^my presenter should present "([^"]*)" from my model$/ do |field_name|
41
- @presenter.send(field_name).should == @model.send(field_name)
42
- end
43
-
44
18
  Then /^my presenter should expose the model via "([^"]*)"$/ do |field_name|
45
19
  @presenter.send(field_name).should == @model
46
20
  end
@@ -1,23 +1,23 @@
1
1
  require 'active_model'
2
2
 
3
3
  class ActiveModelExample
4
- extend ActiveModel::Naming
4
+ extend ActiveModel::Naming
5
5
 
6
- attr_reader :errors
6
+ attr_reader :errors
7
7
 
8
- def initialize
9
- @errors = ActiveModel::Errors.new(self)
10
- end
8
+ def initialize
9
+ @errors = ActiveModel::Errors.new(self)
10
+ end
11
11
 
12
- def to_model
13
- self
14
- end
12
+ def to_model
13
+ self
14
+ end
15
15
 
16
- def to_key; {}; end
17
- def to_param; {}; end
18
- def valid?; true; end
19
- def new_record?; true; end
20
- def destroyed?; true; end
21
- def persisted?; true; end
16
+ def to_key; {}; end
17
+ def to_param; {}; end
18
+ def valid?; true; end
19
+ def new_record?; true; end
20
+ def destroyed?; true; end
21
+ def persisted?; true; end
22
22
  end
23
23
 
@@ -1,2 +1 @@
1
- require 'ruby-debug'
2
1
  require 'catwalk'
@@ -8,19 +8,28 @@ module Catwalk
8
8
  @model = model
9
9
  end
10
10
 
11
- define_method(:to_model) { @model }
12
- define_method(:to_param) { @model.to_param if persisted? }
13
- define_method(:to_key) { @model.to_key if persisted? }
14
- define_method(:persisted?) { @model.persisted? }
15
- define_method(:valid?) { @model.valid? }
16
- define_method(:model_name) { @model.model_name }
17
- define_method(:errors) { @model.errors }
11
+ def to_model; @model; end
12
+ def to_param; @model.to_param if persisted?; end
13
+ def to_key; @model.to_key if persisted?; end
14
+ def persisted?; @model.persisted?; end
15
+ def valid?; @model.valid?; end
16
+ def model_name; @model.model_name; end
17
+ def errors; @model.errors; end
18
18
 
19
19
  module ClassMethods
20
20
 
21
- def field(field_name)
21
+ def field(field_name,opts={})
22
22
  define_method field_name do
23
- @model.send field_name
23
+ field_value = @model.send field_name
24
+ default_when = opts[:default_when]
25
+
26
+ if default_when && field_value.send(default_when)
27
+ "Not Set"
28
+ elsif opts[:format_with] && opts[:format_with].respond_to?(:call)
29
+ opts[:format_with].call field_value
30
+ else
31
+ field_value
32
+ end
24
33
  end
25
34
  end
26
35
 
@@ -1,3 +1,3 @@
1
1
  module Catwalk
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -20,9 +20,9 @@ module Catwalk
20
20
  end
21
21
 
22
22
  describe "active model compliance" do
23
- let(:model_name) { mock 'model_name', human: "Model Name", singular: "model_name", plural: "Model Names", partial_path: '/model' }
24
- let(:active_model_errors) { mock "errors", full_messages: [], :[] => [] }
25
- let(:model) { mock "model", to_key: {}, to_param: {}, valid?: true, persisted?: true, model_name: model_name, errors: active_model_errors }
23
+ let(:model_name) { mock 'model_name', :human => "Model Name", :singular => "model_name", :plural => "Model Names", :partial_path => '/model' }
24
+ let(:active_model_errors) { mock "errors", :full_messages => [], :[] => [] }
25
+ let(:model) { mock "model", :to_key => {}, :to_param => {}, :valid? => true, :persisted? => true, :model_name => model_name, :errors => active_model_errors }
26
26
 
27
27
  before do
28
28
  model_name.stub(:kind_of?).with(String).and_return(true)
@@ -30,12 +30,12 @@ module Catwalk
30
30
  subject { presenter }
31
31
 
32
32
  it_should_behave_like "ActiveModel"
33
- it_should_behave_like "proxy active_model method", :to_key, from: :model
34
- it_should_behave_like "proxy active_model method", :to_param, from: :model
35
- it_should_behave_like "proxy active_model method", :valid?, from: :model
36
- it_should_behave_like "proxy active_model method", :persisted?, from: :model
37
- it_should_behave_like "proxy active_model method", :model_name, from: :model
38
- it_should_behave_like "proxy active_model method", :errors, from: :model
33
+ it_should_behave_like "proxy active_model method", :to_key, :from => :model
34
+ it_should_behave_like "proxy active_model method", :to_param, :from => :model
35
+ it_should_behave_like "proxy active_model method", :valid?, :from => :model
36
+ it_should_behave_like "proxy active_model method", :persisted?, :from => :model
37
+ it_should_behave_like "proxy active_model method", :model_name, :from => :model
38
+ it_should_behave_like "proxy active_model method", :errors, :from => :model
39
39
  its(:to_model) { should == model }
40
40
  end
41
41
 
@@ -69,6 +69,52 @@ module Catwalk
69
69
  subject
70
70
  end
71
71
  it { should == model_value }
72
+
73
+ context "when default_when is specified" do
74
+ before do
75
+ model_value.stub(:method_is_true).and_return(false)
76
+ end
77
+
78
+ subject do
79
+ klass.class_eval do
80
+ field :a_field, :default_when => :method_is_true
81
+ end
82
+ presenter.a_field
83
+ end
84
+
85
+ it "should check wether method passes on field" do
86
+ model_value.should_receive(:method_is_true).and_return false
87
+ subject
88
+ end
89
+
90
+ context "and default_when check fails" do
91
+ before do
92
+ model_value.stub(:method_is_true).and_return true
93
+ end
94
+
95
+ it { should == "Not Set" }
96
+ end
97
+ end
98
+ context "when format_with block is specified" do
99
+ let(:formatted_value) { "nicer value" }
100
+
101
+ before do
102
+ model_value.stub(:my_format_method).and_return formatted_value
103
+ end
104
+
105
+ subject do
106
+ klass.class_eval do
107
+ field :a_field, :format_with => lambda { |field| field.my_format_method }
108
+ end
109
+ presenter.a_field
110
+ end
111
+
112
+ it "should format the field with the block" do
113
+ model_value.should_receive(:my_format_method).and_return formatted_value
114
+ subject
115
+ end
116
+ it { should == formatted_value }
117
+ end
72
118
  end
73
119
  end
74
120
  end
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,3 @@
1
- require 'ruby-debug'
2
-
3
1
  require 'catwalk'
4
2
 
5
3
  Dir["./spec/support/**/*.rb"].each { |f| require f }
metadata CHANGED
@@ -1,121 +1,130 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: catwalk
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 1
9
- version: 0.0.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Jon Rowe
13
8
  autorequire:
14
9
  bindir: bin
15
- cert_chain: []
16
-
17
- date: 2011-01-23 00:00:00 +00:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: rspec
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- version: "0"
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDVjCCAj6gAwIBAgIBADANBgkqhkiG9w0BAQUFADBRMQ4wDAYDVQQDDAVoZWxs
14
+ bzEXMBUGCgmSJomT8ixkARkWB2pvbnJvd2UxEjAQBgoJkiaJk/IsZAEZFgJjbzES
15
+ MBAGCgmSJomT8ixkARkWAnVrMB4XDTEzMDIwMzA4MTgwNloXDTE0MDIwMzA4MTgw
16
+ NlowUTEOMAwGA1UEAwwFaGVsbG8xFzAVBgoJkiaJk/IsZAEZFgdqb25yb3dlMRIw
17
+ EAYKCZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJ1azCCASIwDQYJKoZI
18
+ hvcNAQEBBQADggEPADCCAQoCggEBAMhs6ng/SRrYfG7RtQx8liJTZs8tpz7PBnlH
19
+ qyOwuU0weJc7nh6C9C8LGyJzpkbjJJo1rfTMg7huDyL14Py82dfMDomApif8jNNI
20
+ 8KtviAgB1DrWq0fCDLtu/M77+yuVV3OhDdrAFaBkT/euvdJ8cAKrLxbJ+klgvrcB
21
+ FK+c4PUV3/zBKghe0l7FuDhyQCsuLNDbWyFvDS97tPjeN6yWuszwg22vZMDdsuzN
22
+ Cj3M4LLSkbrt+AOUcysEJxI4t6uv2U1bRzHsDfAF0RI/Q7OMtUr+Dtz/2YJ47KKs
23
+ 51ZRjLLGHd10XrIfFSfGyJj1dMbDgLsEBj1sFH4e6dy7gau8TaUCAwEAAaM5MDcw
24
+ CQYDVR0TBAIwADAdBgNVHQ4EFgQULu5JH2g7RAjoXaZt+fbrfNDI9IkwCwYDVR0P
25
+ BAQDAgSwMA0GCSqGSIb3DQEBBQUAA4IBAQAf5A4kB769DPKGjPZ++v42FwVi7X7v
26
+ RpufPs6R4YHyzHXaJmAqnhleZhVJijBgsdb2SigNRbg+IK8XYHg7jkonMgO8OS3D
27
+ C6w8VB5bI0PqyDOwCGcQkYHYlZZWCghAyBTSBowHAekMb9V3QjJtJ8XkizjshETO
28
+ ZCVI2AObjlJi8I10aK2tSo9sv2riCKZ92BVSM13zYWn+C/eCP/m9BDiw37UQtuQq
29
+ 2feWfO4gCNmvfFjULOAYHq9JHEjN5SLSXvj5HdSnDcCyIfJKn5Ya3JahWQaWIsXf
30
+ /NPE/mB57TOwj+d7XUa2NC4HUadF8R51IYEcIB0PpIEzJlKtfXFcOZxO
31
+ -----END CERTIFICATE-----
32
+ date: 2013-07-16 00:00:00.000000000 Z
33
+ dependencies:
34
+ - !ruby/object:Gem::Dependency
35
+ name: rake
36
+ requirement: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
31
41
  type: :development
32
- version_requirements: *id001
33
- - !ruby/object:Gem::Dependency
34
- name: cucumber
35
42
  prerelease: false
36
- requirement: &id002 !ruby/object:Gem::Requirement
37
- none: false
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
- version: "0"
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ - !ruby/object:Gem::Dependency
49
+ name: rspec
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
44
55
  type: :development
45
- version_requirements: *id002
46
- - !ruby/object:Gem::Dependency
47
- name: ruby-debug19
48
56
  prerelease: false
49
- requirement: &id003 !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- segments:
55
- - 0
56
- version: "0"
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: cucumber
64
+ requirement: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
57
69
  type: :development
58
- version_requirements: *id003
59
- - !ruby/object:Gem::Dependency
60
- name: autotest-standalone
61
70
  prerelease: false
62
- requirement: &id004 !ruby/object:Gem::Requirement
63
- none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- segments:
68
- - 0
69
- version: "0"
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ - !ruby/object:Gem::Dependency
77
+ name: autotest-standalone
78
+ requirement: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
70
83
  type: :development
71
- version_requirements: *id004
72
- - !ruby/object:Gem::Dependency
73
- name: autotest-fsevent
74
84
  prerelease: false
75
- requirement: &id005 !ruby/object:Gem::Requirement
76
- none: false
77
- requirements:
78
- - - ">="
79
- - !ruby/object:Gem::Version
80
- segments:
81
- - 0
82
- version: "0"
83
- type: :development
84
- version_requirements: *id005
85
- - !ruby/object:Gem::Dependency
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ - !ruby/object:Gem::Dependency
86
91
  name: activemodel
87
- prerelease: false
88
- requirement: &id006 !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ">="
92
- - !ruby/object:Gem::Version
93
- segments:
94
- - 0
95
- version: "0"
92
+ requirement: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
96
97
  type: :development
97
- version_requirements: *id006
98
- description: Catwalk is a gem for showing off models. It allows you to seperate presentation logic from data models.
99
- email:
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ description: Catwalk is a gem for showing off models. It allows you to seperate presentation
105
+ logic from data models.
106
+ email:
100
107
  - hello@jonrowe.co.uk
101
108
  executables: []
102
-
103
109
  extensions: []
104
-
105
110
  extra_rdoc_files: []
106
-
107
- files:
111
+ files:
108
112
  - .autotest
109
113
  - .gitignore
110
114
  - .rspec
115
+ - .travis.yml
111
116
  - Gemfile
117
+ - README.md
112
118
  - Rakefile
113
119
  - catwalk.gemspec
114
120
  - cucumber.yml
115
121
  - features/active_model_compatibility.feature
116
122
  - features/basic_fields.feature
123
+ - features/field_with_default_when_specified.feature
124
+ - features/field_with_format_block.feature
117
125
  - features/specifying_model_accessor.feature
118
126
  - features/step_definitions/model_steps.rb
127
+ - features/step_definitions/presenter_field_steps.rb
119
128
  - features/step_definitions/presenter_steps.rb
120
129
  - features/support/active_model_example.rb
121
130
  - features/support/env.rb
@@ -126,44 +135,39 @@ files:
126
135
  - spec/spec_helper.rb
127
136
  - spec/support/active_model_lint.rb
128
137
  - spec/support/active_model_proxy_shared_examples.rb
129
- has_rdoc: true
130
138
  homepage: http://github.com/jonrowe/catwalk
131
139
  licenses: []
132
-
140
+ metadata: {}
133
141
  post_install_message:
134
142
  rdoc_options: []
135
-
136
- require_paths:
143
+ require_paths:
137
144
  - lib
138
- required_ruby_version: !ruby/object:Gem::Requirement
139
- none: false
140
- requirements:
141
- - - ">="
142
- - !ruby/object:Gem::Version
143
- segments:
144
- - 0
145
- version: "0"
146
- required_rubygems_version: !ruby/object:Gem::Requirement
147
- none: false
148
- requirements:
149
- - - ">="
150
- - !ruby/object:Gem::Version
151
- segments:
152
- - 0
153
- version: "0"
145
+ required_ruby_version: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ required_rubygems_version: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - '>='
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
154
155
  requirements: []
155
-
156
156
  rubyforge_project:
157
- rubygems_version: 1.3.7
157
+ rubygems_version: 2.0.3
158
158
  signing_key:
159
- specification_version: 3
160
- summary: Catwalk is a gem for showing off models. It allows you to seperate presentation logic from data models.
161
- test_files:
159
+ specification_version: 4
160
+ summary: Catwalk is a gem for showing off models. It allows you to seperate presentation
161
+ logic from data models.
162
+ test_files:
162
163
  - .autotest
163
164
  - features/active_model_compatibility.feature
164
165
  - features/basic_fields.feature
166
+ - features/field_with_default_when_specified.feature
167
+ - features/field_with_format_block.feature
165
168
  - features/specifying_model_accessor.feature
166
169
  - features/step_definitions/model_steps.rb
170
+ - features/step_definitions/presenter_field_steps.rb
167
171
  - features/step_definitions/presenter_steps.rb
168
172
  - features/support/active_model_example.rb
169
173
  - features/support/env.rb
metadata.gz.sig ADDED
Binary file