increment_with_sql 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: e9ddd94d36010860953df5cd087d46b089e1d12c
4
+ data.tar.gz: 911aa29d9043354d72a0968fbd604c6b5acbf5c5
5
+ SHA512:
6
+ metadata.gz: 92f8e020b4ecaa706f7687d51036928fdb98f5d406ac1f6cf34b45a30c077bd2be062b69bbb695294b9552c06bbf71fb7b8185e9641203f237ab59e335fd0fc7
7
+ data.tar.gz: 45dfc337a24a4dce24b3e9f69a04e6f5b2f4fcb75e8531b9856ca26a24f168ab5da9f43d405dc48b2603e412bf01a5399e855f432733525cbdc1b3631e6d62e9
data/.travis.yml CHANGED
@@ -31,4 +31,5 @@ install:
31
31
  - "travis_retry bundle install"
32
32
 
33
33
  script: "bundle exec rake test"
34
+ sudo: false
34
35
 
data/Gemfile CHANGED
@@ -2,3 +2,22 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in increment_with_sql.gemspec
4
4
  gemspec
5
+
6
+ platforms :jruby do
7
+ gem 'activerecord-jdbcmysql-adapter'
8
+ gem 'activerecord-jdbcsqlite3-adapter'
9
+ gem 'activerecord-jdbcpostgresql-adapter'
10
+ end
11
+
12
+ platforms :ruby do
13
+ gem 'sqlite3'
14
+ gem 'mysql2'
15
+ gem 'pg'
16
+ end
17
+
18
+ platforms :rbx do
19
+ gem 'racc'
20
+ gem 'rubysl', '~> 2.0'
21
+ gem 'psych'
22
+ end
23
+
data/gemfiles/3.2.gemfile CHANGED
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  platforms :ruby do
15
15
  gem "sqlite3"
16
- gem "mysql2"
16
+ gem "mysql2", "~> 0.3.20"
17
17
  gem "pg"
18
18
  end
19
19
 
data/gemfiles/4.0.gemfile CHANGED
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  platforms :ruby do
15
15
  gem "sqlite3"
16
- gem "mysql2"
16
+ gem "mysql2", "~> 0.3.20"
17
17
  gem "pg"
18
18
  end
19
19
 
data/gemfiles/4.1.gemfile CHANGED
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  platforms :ruby do
15
15
  gem "sqlite3"
16
- gem "mysql2"
16
+ gem "mysql2", "~> 0.3.20"
17
17
  gem "pg"
18
18
  end
19
19
 
data/gemfiles/4.2.gemfile CHANGED
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  platforms :ruby do
15
15
  gem "sqlite3"
16
- gem "mysql2"
16
+ gem "mysql2", "~> 0.3.20"
17
17
  gem "pg"
18
18
  end
19
19
 
@@ -1,3 +1,3 @@
1
1
  module IncrementWithSql
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -13,7 +13,7 @@ module IncrementWithSql
13
13
  self.class.transaction do
14
14
  self.class.where(:id => id).update_all("#{self.class.connection.quote_column_name attribute} = CASE WHEN #{self.class.connection.quote_column_name attribute} IS NULL THEN 0 ELSE #{self.class.connection.quote_column_name attribute} END + #{by.to_i}")
15
15
 
16
- send "#{attribute}=", self.class.where(:id => id).select(attribute).first.send(attribute)
16
+ send "#{attribute}=", self.class.unscoped.where(:id => id).select(attribute).first.send(attribute)
17
17
 
18
18
  if respond_to?(:clear_attribute_changes, true)
19
19
  send :clear_attribute_changes, attribute
metadata CHANGED
@@ -1,94 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: increment_with_sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Benjamin Vetter
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-04-09 00:00:00.000000000 Z
11
+ date: 2016-01-30 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '1.7'
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: '1.7'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: '10.0'
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
45
40
  version: '10.0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: activerecord
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: 3.0.0
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: 3.0.0
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: appraisal
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: minitest
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  description: Provides increment_with_sql! and decrement_with_sql! for ActiveRecord
@@ -99,8 +88,8 @@ executables: []
99
88
  extensions: []
100
89
  extra_rdoc_files: []
101
90
  files:
102
- - .gitignore
103
- - .travis.yml
91
+ - ".gitignore"
92
+ - ".travis.yml"
104
93
  - Appraisals
105
94
  - Gemfile
106
95
  - LICENSE.txt
@@ -119,27 +108,26 @@ files:
119
108
  homepage: https://github.com/mrkamel/increment_with_sql
120
109
  licenses:
121
110
  - MIT
111
+ metadata: {}
122
112
  post_install_message:
123
113
  rdoc_options: []
124
114
  require_paths:
125
115
  - lib
126
116
  required_ruby_version: !ruby/object:Gem::Requirement
127
- none: false
128
117
  requirements:
129
- - - ! '>='
118
+ - - ">="
130
119
  - !ruby/object:Gem::Version
131
120
  version: '0'
132
121
  required_rubygems_version: !ruby/object:Gem::Requirement
133
- none: false
134
122
  requirements:
135
- - - ! '>='
123
+ - - ">="
136
124
  - !ruby/object:Gem::Version
137
125
  version: '0'
138
126
  requirements: []
139
127
  rubyforge_project:
140
- rubygems_version: 1.8.23
128
+ rubygems_version: 2.2.2
141
129
  signing_key:
142
- specification_version: 3
130
+ specification_version: 4
143
131
  summary: Provides increment_with_sql! and decrement_with_sql! for ActiveRecord models
144
132
  test_files:
145
133
  - test/database.yml