arcane 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ gemfiles/*.lock
@@ -4,9 +4,9 @@ rvm:
4
4
  - 1.9.3
5
5
  - 1.9.2
6
6
  - jruby-19mode
7
+ - jruby-20mode
7
8
  - rbx-19mode
8
9
 
9
- env:
10
- - "strong_parameters=0.2.1"
11
- - "activesupport=3.2.13"
12
- - "activesupport=4.0.0"
10
+ gemfile:
11
+ - gemfiles/rails3.gemfile
12
+ - gemfiles/rails4.gemfile
@@ -1,4 +1,11 @@
1
- ### Arcane **1.0.0.pre** [head] - 2013-07-12
1
+ ### Arcane **1.1.0** [head][current] - 2013-07-17
2
+ * **[bugfix]** Fixed dependency hell for rails 4.
3
+ Makde sure strong_parameters is optional. Upgrading
4
+ to this will break compatability with rails 3 unless
5
+ you have specifically added `strong_parameters` to
6
+ your Gemfile already.
7
+
8
+ ### Arcane **1.0.0** - 2013-07-13
2
9
  * **[deprecation]** The `refine` helper no longer
3
10
  exist, as it's a proposed keyword for ruby 2.0 look
4
11
  to the new features for how to access arcane.
@@ -16,7 +23,7 @@
16
23
  * **[bugfix]** You can now properly specify
17
24
  `refinery_class` in your model.
18
25
 
19
- ### Arcane **0.1.1** [current] – 2013-07-11
26
+ ### Arcane **0.1.1** [old] – 2013-07-11
20
27
  * **[feature]** The `refine` helper no longer needs a
21
28
  refinery method, it will try and detect which one to
22
29
  use based on parameters.
@@ -29,4 +36,4 @@
29
36
  keys to be sent as arguments.
30
37
 
31
38
  ### Arcane **0.0.3** [old] – 2013-07-11
32
- * Initial Release
39
+ * Initial Release
data/README.md CHANGED
@@ -13,7 +13,7 @@ Inspired by [Pundit](https://github.com/elabs/pundit)
13
13
 
14
14
  #### Breaking Changes - Check [CHANGELOG.md](https://github.com/cloudsdaleapp/arcane/blob/master/CHANGELOG.md)
15
15
 
16
- **This branch is showing a pre-release of Arcane, to install the this release, do this:**
16
+ #### Is it production ready? Yes.
17
17
 
18
18
  ## Installation
19
19
 
@@ -23,6 +23,12 @@ Add this line to your application's Gemfile:
23
23
  gem "arcane", "~> 1.0.0"
24
24
  ```
25
25
 
26
+ If you are still on Rails 3, add this to your Gemfile as well:
27
+
28
+ ```ruby
29
+ gem "strong_parameters", "~> 0.2.0"
30
+ ```
31
+
26
32
  And then execute:
27
33
 
28
34
  ```bash
@@ -312,8 +318,30 @@ Currently this gem is only supported for Rails and with any of these ruby versio
312
318
 
313
319
  ## Contributing
314
320
 
315
- 1. Fork it
316
- 2. Create your feature branch (`git checkout -b my-new-feature`)
317
- 3. Commit your changes (`git commit -am 'Add some feature'`)
318
- 4. Push to the branch (`git push origin my-new-feature`)
319
- 5. Create new Pull Request
321
+ #### 1. Fork us
322
+ #### 2. Create your feature branch
323
+
324
+ ```bash
325
+ git checkout -b my-new-feature
326
+ ```
327
+
328
+ #### 3. Running specs
329
+
330
+ ```bash
331
+ # Rails 3
332
+ env BUNDLE_GEMFILE=./gemfiles/rails3.gemfile bundle exec rspec
333
+ # Rails 4
334
+ env BUNDLE_GEMFILE=./gemfiles/rails4.gemfile bundle exec rspec
335
+ ```
336
+
337
+ #### 4. Commit your changes
338
+ ```bash
339
+ git commit -am 'Add some feature'
340
+ ```
341
+
342
+ #### 5. Push to the branch
343
+ ```
344
+ git push origin my-new-feature
345
+ ```
346
+
347
+ #### 6. Create new Pull Request
@@ -8,20 +8,20 @@ Gem::Specification.new do |gem|
8
8
  gem.name = "arcane"
9
9
  gem.version = Arcane::VERSION
10
10
  gem.authors = ["Philip Vieira", "Cloudsdale"]
11
- gem.email = ["philip@vallin.se"]
11
+ gem.email = ["philip@vallin.se", "ask@cloudsdale.org"]
12
12
 
13
13
  gem.description = "Parameter filter done OO, extending strong parameters."
14
14
  gem.summary = "Extension for strong_parameters."
15
15
  gem.homepage = "https://github.com/cloudsdaleapp/arcane"
16
16
  gem.license = "MIT"
17
-
17
+
18
18
  gem.files = `git ls-files`.split($/)
19
19
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
20
20
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
21
21
  gem.require_paths = ["lib"]
22
22
 
23
- gem.add_dependency "activesupport", ">= 3.0.0"
24
- gem.add_dependency "strong_parameters", ">= 0.2.0"
23
+ gem.add_dependency "activesupport", ">= 3.0.0", "< 5.0.0"
24
+ gem.add_dependency "actionpack", ">= 3.0.0", "< 5.0.0"
25
25
 
26
26
  gem.add_development_dependency "activerecord", ">= 3.0.0"
27
27
  gem.add_development_dependency "rspec", "~>2.0"
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "activesupport", "~> 3.2.13"
4
+ gem "actionpack", "~> 3.2.13"
5
+ gem "strong_parameters", "~> 0.2.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "activesupport", "~> 4.0.0"
4
+ gem "actionpack", "~> 4.0.0"
5
+
6
+ gemspec path: "../"
@@ -1,7 +1,12 @@
1
1
  require 'active_support/concern'
2
2
  require 'active_support/core_ext/string/inflections'
3
3
  require 'active_support/core_ext/object/blank'
4
- require 'strong_parameters'
4
+ require 'action_controller'
5
+
6
+ begin
7
+ require 'strong_parameters'
8
+ rescue LoadError
9
+ end
5
10
 
6
11
  require "arcane/version"
7
12
  require "arcane/finder"
@@ -1,3 +1,3 @@
1
1
  module Arcane
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arcane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Philip Vieira
@@ -9,53 +10,72 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-07-13 00:00:00.000000000 Z
13
+ date: 2013-07-17 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: activesupport
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
- - - '>='
20
+ - - ! '>='
19
21
  - !ruby/object:Gem::Version
20
22
  version: 3.0.0
23
+ - - <
24
+ - !ruby/object:Gem::Version
25
+ version: 5.0.0
21
26
  type: :runtime
22
27
  prerelease: false
23
28
  version_requirements: !ruby/object:Gem::Requirement
29
+ none: false
24
30
  requirements:
25
- - - '>='
31
+ - - ! '>='
26
32
  - !ruby/object:Gem::Version
27
33
  version: 3.0.0
34
+ - - <
35
+ - !ruby/object:Gem::Version
36
+ version: 5.0.0
28
37
  - !ruby/object:Gem::Dependency
29
- name: strong_parameters
38
+ name: actionpack
30
39
  requirement: !ruby/object:Gem::Requirement
40
+ none: false
31
41
  requirements:
32
- - - '>='
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: 3.0.0
45
+ - - <
33
46
  - !ruby/object:Gem::Version
34
- version: 0.2.0
47
+ version: 5.0.0
35
48
  type: :runtime
36
49
  prerelease: false
37
50
  version_requirements: !ruby/object:Gem::Requirement
51
+ none: false
38
52
  requirements:
39
- - - '>='
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: 3.0.0
56
+ - - <
40
57
  - !ruby/object:Gem::Version
41
- version: 0.2.0
58
+ version: 5.0.0
42
59
  - !ruby/object:Gem::Dependency
43
60
  name: activerecord
44
61
  requirement: !ruby/object:Gem::Requirement
62
+ none: false
45
63
  requirements:
46
- - - '>='
64
+ - - ! '>='
47
65
  - !ruby/object:Gem::Version
48
66
  version: 3.0.0
49
67
  type: :development
50
68
  prerelease: false
51
69
  version_requirements: !ruby/object:Gem::Requirement
70
+ none: false
52
71
  requirements:
53
- - - '>='
72
+ - - ! '>='
54
73
  - !ruby/object:Gem::Version
55
74
  version: 3.0.0
56
75
  - !ruby/object:Gem::Dependency
57
76
  name: rspec
58
77
  requirement: !ruby/object:Gem::Requirement
78
+ none: false
59
79
  requirements:
60
80
  - - ~>
61
81
  - !ruby/object:Gem::Version
@@ -63,6 +83,7 @@ dependencies:
63
83
  type: :development
64
84
  prerelease: false
65
85
  version_requirements: !ruby/object:Gem::Requirement
86
+ none: false
66
87
  requirements:
67
88
  - - ~>
68
89
  - !ruby/object:Gem::Version
@@ -70,34 +91,39 @@ dependencies:
70
91
  - !ruby/object:Gem::Dependency
71
92
  name: pry
72
93
  requirement: !ruby/object:Gem::Requirement
94
+ none: false
73
95
  requirements:
74
- - - '>='
96
+ - - ! '>='
75
97
  - !ruby/object:Gem::Version
76
98
  version: '0'
77
99
  type: :development
78
100
  prerelease: false
79
101
  version_requirements: !ruby/object:Gem::Requirement
102
+ none: false
80
103
  requirements:
81
- - - '>='
104
+ - - ! '>='
82
105
  - !ruby/object:Gem::Version
83
106
  version: '0'
84
107
  - !ruby/object:Gem::Dependency
85
108
  name: rake
86
109
  requirement: !ruby/object:Gem::Requirement
110
+ none: false
87
111
  requirements:
88
- - - '>='
112
+ - - ! '>='
89
113
  - !ruby/object:Gem::Version
90
114
  version: '0'
91
115
  type: :development
92
116
  prerelease: false
93
117
  version_requirements: !ruby/object:Gem::Requirement
118
+ none: false
94
119
  requirements:
95
- - - '>='
120
+ - - ! '>='
96
121
  - !ruby/object:Gem::Version
97
122
  version: '0'
98
123
  description: Parameter filter done OO, extending strong parameters.
99
124
  email:
100
125
  - philip@vallin.se
126
+ - ask@cloudsdale.org
101
127
  executables: []
102
128
  extensions: []
103
129
  extra_rdoc_files: []
@@ -111,6 +137,8 @@ files:
111
137
  - README.md
112
138
  - Rakefile
113
139
  - arcane.gemspec
140
+ - gemfiles/rails3.gemfile
141
+ - gemfiles/rails4.gemfile
114
142
  - lib/arcane.rb
115
143
  - lib/arcane/finder.rb
116
144
  - lib/arcane/parameters.rb
@@ -130,26 +158,33 @@ files:
130
158
  homepage: https://github.com/cloudsdaleapp/arcane
131
159
  licenses:
132
160
  - MIT
133
- metadata: {}
134
161
  post_install_message:
135
162
  rdoc_options: []
136
163
  require_paths:
137
164
  - lib
138
165
  required_ruby_version: !ruby/object:Gem::Requirement
166
+ none: false
139
167
  requirements:
140
- - - '>='
168
+ - - ! '>='
141
169
  - !ruby/object:Gem::Version
142
170
  version: '0'
171
+ segments:
172
+ - 0
173
+ hash: 852660148027280947
143
174
  required_rubygems_version: !ruby/object:Gem::Requirement
175
+ none: false
144
176
  requirements:
145
- - - '>='
177
+ - - ! '>='
146
178
  - !ruby/object:Gem::Version
147
179
  version: '0'
180
+ segments:
181
+ - 0
182
+ hash: 852660148027280947
148
183
  requirements: []
149
184
  rubyforge_project:
150
- rubygems_version: 2.0.3
185
+ rubygems_version: 1.8.25
151
186
  signing_key:
152
- specification_version: 4
187
+ specification_version: 3
153
188
  summary: Extension for strong_parameters.
154
189
  test_files:
155
190
  - spec/arcane/finder_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: a862bb0fc096981789134db824772a2dab9355f8
4
- data.tar.gz: e7e02551cda7792cc50bdfb18db771ec49d438a4
5
- SHA512:
6
- metadata.gz: a929d3ac3a2fdea27cc51fe56056fa5280bdc8c83a938a5ae6743202680f7ca269f3cb9b0c53eedf13ab0f727bdeff7d48488e0c4bae942eb2306c369d26b50d
7
- data.tar.gz: 9a069440ffd9a1f4daf7450d33e7e704dd2c0d0171e5210d60093f94bc9a7cde7298b37a9ff1d34244548e8f2848ca077969a08ac598ce393d354e8b65291228