foundation_rails_helper 1.2.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
1
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
2
2
  require "foundation_rails_helper"
3
3
  require "capybara"
4
4
 
@@ -0,0 +1,2 @@
1
+ inherit_from:
2
+ - ../../.rubocop.yml
@@ -28,7 +28,7 @@ module FoundationRailsSpecHelper
28
28
  include ActionDispatch::Routing::UrlFor
29
29
 
30
30
  def active_model_validator(kind, attributes, options = {})
31
- validator = mock("ActiveModel::Validations::#{kind.to_s.titlecase}Validator", :attributes => attributes, :options => options)
31
+ validator = mock("ActiveModel::Validations::#{kind.to_s.titlecase}Validator", attributes: attributes, options: options)
32
32
  allow(validator).to receive(:kind).and_return(kind)
33
33
  validator
34
34
  end
@@ -85,9 +85,17 @@ module FoundationRailsSpecHelper
85
85
  def mock_everything
86
86
  # Resource-oriented styles like form_for(@post) will expect a path method for the object,
87
87
  # so we're defining some here.
88
- def author_path(*args); "/authors/1"; end
89
- def authors_path(*args); "/authors"; end
90
- def new_author_path(*args); "/authors/new"; end
88
+ def author_path(*_args)
89
+ '/authors/1'
90
+ end
91
+
92
+ def authors_path(*_args)
93
+ '/authors'
94
+ end
95
+
96
+ def new_author_path(*_args)
97
+ '/authors/new'
98
+ end
91
99
 
92
100
  @author = ::Author.new
93
101
  allow(@author).to receive(:class).and_return(::Author)
@@ -101,29 +109,29 @@ module FoundationRailsSpecHelper
101
109
  allow(@author).to receive(:active).and_return(true)
102
110
  allow(@author).to receive(:description).and_return('bla bla bla')
103
111
  allow(@author).to receive(:avatar).and_return('avatar.png')
104
- allow(@author).to receive(:birthdate).and_return(DateTime.parse("1969-06-18 20:30"))
112
+ allow(@author).to receive(:birthdate).and_return(DateTime.parse('1969-06-18 20:30'))
105
113
  allow(@author).to receive(:id).and_return(37)
106
114
  allow(@author).to receive(:new_record?).and_return(false)
107
115
  allow(@author).to receive(:errors).and_return(double('errors', :[] => nil))
108
116
  allow(@author).to receive(:to_key).and_return(nil)
109
117
  allow(@author).to receive(:persisted?).and_return(nil)
110
- allow(@author).to receive(:time_zone).and_return("Perth")
111
- allow(@author).to receive(:publish_date).and_return(Date.new( 2000, 1, 1 ))
118
+ allow(@author).to receive(:time_zone).and_return('Perth')
119
+ allow(@author).to receive(:publish_date).and_return(Date.new(2000, 1, 1))
112
120
  allow(@author).to receive(:forty_two).and_return(@author.birthdate + 42.years)
113
- allow(@author).to receive(:favorite_color).and_return("#424242")
121
+ allow(@author).to receive(:favorite_color).and_return('#424242')
114
122
  allow(@author).to receive(:favorite_book).and_return(nil)
115
123
 
116
124
  @book_0 = ::Book.new
117
- allow(@book_0).to receive(:id).and_return("78")
125
+ allow(@book_0).to receive(:id).and_return('78')
118
126
  allow(@book_0).to receive(:title).and_return("Gulliver's Travels")
119
127
  @book_1 = ::Book.new
120
- allow(@book_1).to receive(:id).and_return("133")
121
- allow(@book_1).to receive(:title).and_return("Treasure Island")
128
+ allow(@book_1).to receive(:id).and_return('133')
129
+ allow(@book_1).to receive(:title).and_return('Treasure Island')
122
130
  @genre_0 = ::Genre.new
123
- allow(@genre_0).to receive(:name).and_return("Exploration")
131
+ allow(@genre_0).to receive(:name).and_return('Exploration')
124
132
  allow(@genre_0).to receive(:books).and_return([@book_0])
125
133
  @genre_1 = ::Genre.new
126
- allow(@genre_1).to receive(:name).and_return("Pirate Exploits")
134
+ allow(@genre_1).to receive(:name).and_return('Pirate Exploits')
127
135
  allow(@genre_1).to receive(:books).and_return([@book_1])
128
136
 
129
137
  allow(::Author).to receive(:scoped).and_return(::Author)
@@ -132,7 +140,7 @@ module FoundationRailsSpecHelper
132
140
  allow(::Author).to receive(:where).and_return([@author])
133
141
  allow(::Author).to receive(:human_attribute_name) { |column_name| column_name.to_s.humanize }
134
142
  allow(::Author).to receive(:human_name).and_return('::Author')
135
- allow(::Author).to receive(:content_columns).and_return([double('column', :name => 'login'), double('column', :name => 'created_at')])
143
+ allow(::Author).to receive(:content_columns).and_return([double('column', name: 'login'), double('column', name: 'created_at')])
136
144
  allow(::Author).to receive(:to_key).and_return(nil)
137
145
  allow(::Author).to receive(:persisted?).and_return(nil)
138
146
 
@@ -147,7 +155,6 @@ module FoundationRailsSpecHelper
147
155
  def protect_against_forgery?
148
156
  false
149
157
  end
150
-
151
158
  end
152
159
  end
153
160
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foundation_rails_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Gruhier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-14 00:00:00.000000000 Z
11
+ date: 2016-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -128,6 +128,20 @@ dependencies:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
130
  version: '2.7'
131
+ - !ruby/object:Gem::Dependency
132
+ name: rubocop
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">"
136
+ - !ruby/object:Gem::Version
137
+ version: '0.41'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">"
143
+ - !ruby/object:Gem::Version
144
+ version: '0.41'
131
145
  description: Rails for zurb foundation CSS framework. Form builder, flash message,
132
146
  ...
133
147
  email:
@@ -138,6 +152,8 @@ extra_rdoc_files: []
138
152
  files:
139
153
  - ".gitignore"
140
154
  - ".rspec"
155
+ - ".rubocop.yml"
156
+ - ".rubocop_todo.yml"
141
157
  - ".travis.yml"
142
158
  - CHANGELOG.md
143
159
  - CONTRIBUTING.md
@@ -153,10 +169,12 @@ files:
153
169
  - lib/foundation_rails_helper/form_builder.rb
154
170
  - lib/foundation_rails_helper/version.rb
155
171
  - lib/railtie.rb
172
+ - spec/.rubocop.yml
156
173
  - spec/foundation_rails_helper/configuration_spec.rb
157
174
  - spec/foundation_rails_helper/flash_helper_spec.rb
158
175
  - spec/foundation_rails_helper/form_builder_spec.rb
159
176
  - spec/spec_helper.rb
177
+ - spec/support/.rubocop.yml
160
178
  - spec/support/mock_rails.rb
161
179
  homepage: http://github.com/sgruhier/foundation_rails_helper
162
180
  licenses:
@@ -187,5 +205,6 @@ test_files:
187
205
  - spec/foundation_rails_helper/flash_helper_spec.rb
188
206
  - spec/foundation_rails_helper/form_builder_spec.rb
189
207
  - spec/spec_helper.rb
208
+ - spec/support/.rubocop.yml
190
209
  - spec/support/mock_rails.rb
191
210
  has_rdoc: