classy_enum 3.3.1 → 3.3.2

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
  SHA1:
3
- metadata.gz: 45044a722b58936978086da28b62bb08201c455b
4
- data.tar.gz: 53dda48051a67227813a924acf839c6301d65059
3
+ metadata.gz: dd8f827576d5863923d1700d81be95ccc85495a9
4
+ data.tar.gz: ba0b639734522273bc380f7f772a69e8c586d9db
5
5
  SHA512:
6
- metadata.gz: bd3b5a77302bdeca43a13aaa08bf3120e439218029710f5558ef5765d55e7f8aab87c6a9aaba009cb3c68b4b35d5bbf53bd3496950dee4251f5a9c2ed74340d4
7
- data.tar.gz: 61b2612a989cda2ac2d9a034ad49fca2212b43aa15c10d09c6d72b49ef7e9d9531fa9fd82da439780fffe7a3f6779d6691d8bb504e92c3002939ba8f38ae74bf
6
+ metadata.gz: 9e6df9008d2535fb6e4ddc3ecf6f5aad2f37d849b2f18b6271c7a21542fd38883095e3d8cc9c60e42cfbc7903efc94e3cd7a45411f5eee4cc1d1a2627db9805f
7
+ data.tar.gz: b78ad295a389584f2a05a92e21b10759185bcec10168312dc7a90226c6329a3f727d68a0a8e6080f47b7290cb2bde8736cced605fa4d0d7f4c16eba90404f68b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # ClassyEnum Changelog
2
2
 
3
+ ## 3.3.2
4
+
5
+ * Fixes `rails destroy classy_enum MyEnum` for test unit
6
+ * Fixes edge case support for Arel 4.0.1 internal change
7
+
3
8
  ## 3.3.1
4
9
 
5
10
  * Fixes `rails destroy classy_enum MyEnum` so it does not remove enums
@@ -32,11 +32,21 @@ module ClassyEnum
32
32
  visitor_method = "visit_#{klass.name.split('::').join('_')}"
33
33
 
34
34
  Arel::Visitors::ToSql.class_eval do
35
- define_method visitor_method, lambda {|value| quote(value.to_s) }
35
+ define_method visitor_method, lambda {|*values|
36
+ values[0] = values[0].to_s
37
+ begin
38
+ quoted(*values)
39
+ rescue NoMethodError
40
+ quote(*values)
41
+ end
42
+ }
36
43
  end
37
44
 
38
45
  Arel::Visitors::DepthFirst.class_eval do
39
- define_method visitor_method, lambda {|value| terminal(value.to_s) }
46
+ define_method visitor_method, lambda {|*values|
47
+ values[0] = values[0].to_s
48
+ terminal(*values)
49
+ }
40
50
  end
41
51
  end
42
52
 
@@ -1,3 +1,3 @@
1
1
  module ClassyEnum
2
- VERSION = "3.3.1"
2
+ VERSION = "3.3.2"
3
3
  end
@@ -9,8 +9,7 @@ module TestUnit
9
9
  source_root File.expand_path("../templates", __FILE__)
10
10
 
11
11
  def copy_files # :nodoc:
12
- empty_directory 'test/unit/enums'
13
- template "enum_test.rb", "test/unit/enums/#{file_name}_test.rb"
12
+ template "enum_test.rb", "test/enums/#{file_name}_test.rb"
14
13
  end
15
14
  end
16
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classy_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Brown
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-05 00:00:00.000000000 Z
11
+ date: 2013-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  requirements: []
145
145
  rubyforge_project:
146
- rubygems_version: 2.0.3
146
+ rubygems_version: 2.1.11
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: A class based enumerator utility for Ruby on Rails