has-bit-field 1.1.1 → 1.1.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: 2d034fe72970e551a8353183549dd8cf92269792
4
+ data.tar.gz: 50819ec9369f0fe9c0bc209ee689bc1255858e8e
5
+ SHA512:
6
+ metadata.gz: c816a11939309384ba5849a4e7e117f9124880a0a87ef0aa4222741d1eb3d8cad8464cef30ea0927106d9a9ee3093b92600f2f670de4ec518fabe2085ea3453b
7
+ data.tar.gz: b1cb839609aabfe996e387480b02b887e7343a7d4d208e457f64337648fb29c81e8b51b41e7ad7f5bf49bd3214d66638ac90cc35216fffe733c065a125e748fa
data/lib/has-bit-field.rb CHANGED
@@ -4,6 +4,10 @@ module HasBitField
4
4
  # all following arguments should also be symbols,
5
5
  # which will be the name of each flag in the bit field
6
6
  def has_bit_field(bit_field_attribute, *args)
7
+ unless table_exists?
8
+ Rails.logger.error("[has_bit_field] table undefined #{table_name}") if defined?(Rails) && Rails.respond_to?(:logger)
9
+ return
10
+ end
7
11
  if columns_hash[bit_field_attribute.to_s].blank?
8
12
  Rails.logger.error("[has_bit_field] column undefined #{bit_field_attribute}") if defined?(Rails) && Rails.respond_to?(:logger)
9
13
  return
@@ -1,7 +1,7 @@
1
1
  module Has
2
2
  module Bit
3
3
  module Field
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.2"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has-bit-field
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
5
- prerelease:
4
+ version: 1.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Paul Barry
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-24 00:00:00.000000000 Z
11
+ date: 2013-11-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: sqlite3
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: activerecord
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -66,27 +61,26 @@ files:
66
61
  - test/test_helper.rb
67
62
  homepage: http://github.com/pjb3/has-bit-field
68
63
  licenses: []
64
+ metadata: {}
69
65
  post_install_message:
70
66
  rdoc_options: []
71
67
  require_paths:
72
68
  - lib
73
69
  required_ruby_version: !ruby/object:Gem::Requirement
74
- none: false
75
70
  requirements:
76
- - - ! '>='
71
+ - - '>='
77
72
  - !ruby/object:Gem::Version
78
73
  version: '0'
79
74
  required_rubygems_version: !ruby/object:Gem::Requirement
80
- none: false
81
75
  requirements:
82
- - - ! '>='
76
+ - - '>='
83
77
  - !ruby/object:Gem::Version
84
78
  version: '0'
85
79
  requirements: []
86
80
  rubyforge_project: has-bit-field
87
- rubygems_version: 1.8.24
81
+ rubygems_version: 2.0.3
88
82
  signing_key:
89
- specification_version: 3
83
+ specification_version: 4
90
84
  summary: Provides an easy way to work with bit fields in active record
91
85
  test_files:
92
86
  - test/has-bit-field_test.rb