acts_as_account 3.1.0 → 3.1.1

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: b7bc13b86109af52ad3c4ea1e49d3388e6f6bd27
4
- data.tar.gz: 3981321a1ae869e72270881953704e7bc4a8b4e6
3
+ metadata.gz: fdd548cee490f06b827f4704dacdfbcb528c376a
4
+ data.tar.gz: cf009dd35620701443554ddfcb8fb71ae54737bc
5
5
  SHA512:
6
- metadata.gz: 91489dd37949d4288748296de2d67d972c78d38a2bcdb19affb789d7f10ddc9d2b151f8b45a21424644aec7cc62da45a04c56ce9d3f4270f864298dbe08099ab
7
- data.tar.gz: 34a8d296b69f07de19701c66f3bf1ba68e6c905e0e52cc26d41fb857ce14d0f1b41128d80c266965cc82a80f0b235819839910098811903aae12fac2082ce10d
6
+ metadata.gz: 4b45b1fa82c898239e097306e5f4e7ae2a67dc1447285c682bf18eb0c05a3b492d01d46326310b93e8d4227747b7c16a1ce1a579d010124555c22facbf62aaaf
7
+ data.tar.gz: a65cb5057c76470525d8e4a2aef4c6c0962cb8f23723e2747f635bf7ca45ceef8eec082b618645dda8b1a0d1fdc0c04175945fe19fc1c2abd379c4fd072fbc6e
@@ -0,0 +1,13 @@
1
+ rvm:
2
+ - 1.9.2
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.2
6
+ - ruby-head
7
+ - rbx-19mode
8
+ - jruby-19mode
9
+ matrix:
10
+ allow_failures:
11
+ - rvm: ruby-head
12
+ - rvm: rbx-19mode
13
+ - rvm: jruby-19mode
data/Gemfile CHANGED
@@ -1,14 +1,14 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  group :development do
4
- gem 'rspec'
5
- gem 'jeweler'
6
- gem 'cucumber'
7
- gem 'mysql'
4
+ gem 'jeweler', '~> 2.0'
5
+ gem 'cucumber', '~> 1.3'
6
+ gem 'mysql', '~> 2.9'
7
+ gem 'rspec', '~> 3.1'
8
8
  end
9
9
 
10
10
  group :default do
11
- gem 'activerecord', '~> 4.1.0'
12
- gem 'actionpack' , '~> 4.1.0'
13
- gem 'database_cleaner'
11
+ gem 'activerecord', '~> 4.1'
12
+ gem 'actionpack' , '~> 4.1'
13
+ gem 'database_cleaner', '~> 1.3'
14
14
  end
@@ -1,108 +1,114 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- actionpack (4.1.0)
5
- actionview (= 4.1.0)
6
- activesupport (= 4.1.0)
4
+ actionpack (4.1.6)
5
+ actionview (= 4.1.6)
6
+ activesupport (= 4.1.6)
7
7
  rack (~> 1.5.2)
8
8
  rack-test (~> 0.6.2)
9
- actionview (4.1.0)
10
- activesupport (= 4.1.0)
9
+ actionview (4.1.6)
10
+ activesupport (= 4.1.6)
11
11
  builder (~> 3.1)
12
12
  erubis (~> 2.7.0)
13
- activemodel (4.1.0)
14
- activesupport (= 4.1.0)
13
+ activemodel (4.1.6)
14
+ activesupport (= 4.1.6)
15
15
  builder (~> 3.1)
16
- activerecord (4.1.0)
17
- activemodel (= 4.1.0)
18
- activesupport (= 4.1.0)
16
+ activerecord (4.1.6)
17
+ activemodel (= 4.1.6)
18
+ activesupport (= 4.1.6)
19
19
  arel (~> 5.0.0)
20
- activesupport (4.1.0)
20
+ activesupport (4.1.6)
21
21
  i18n (~> 0.6, >= 0.6.9)
22
22
  json (~> 1.7, >= 1.7.7)
23
23
  minitest (~> 5.1)
24
24
  thread_safe (~> 0.1)
25
25
  tzinfo (~> 1.1)
26
- addressable (2.3.5)
26
+ addressable (2.3.6)
27
27
  arel (5.0.1.20140414130214)
28
- builder (3.1.4)
29
- cucumber (1.3.10)
28
+ builder (3.2.2)
29
+ cucumber (1.3.17)
30
30
  builder (>= 2.1.2)
31
31
  diff-lcs (>= 1.1.3)
32
32
  gherkin (~> 2.12)
33
33
  multi_json (>= 1.7.5, < 2.0)
34
- multi_test (>= 0.0.2)
35
- database_cleaner (1.2.0)
34
+ multi_test (>= 0.1.1)
35
+ database_cleaner (1.3.0)
36
+ descendants_tracker (0.0.4)
37
+ thread_safe (~> 0.3, >= 0.3.1)
36
38
  diff-lcs (1.2.5)
37
39
  erubis (2.7.0)
38
- faraday (0.8.8)
39
- multipart-post (~> 1.2.0)
40
+ faraday (0.9.0)
41
+ multipart-post (>= 1.2, < 3)
40
42
  gherkin (2.12.2)
41
43
  multi_json (~> 1.3)
42
- git (1.2.6)
43
- github_api (0.10.1)
44
- addressable
45
- faraday (~> 0.8.1)
46
- hashie (>= 1.2)
47
- multi_json (~> 1.4)
48
- nokogiri (~> 1.5.2)
44
+ git (1.2.8)
45
+ github_api (0.12.1)
46
+ addressable (~> 2.3)
47
+ descendants_tracker (~> 0.0.4)
48
+ faraday (~> 0.8, < 0.10)
49
+ hashie (>= 3.2)
50
+ multi_json (>= 1.7.5, < 2.0)
51
+ nokogiri (~> 1.6.3)
49
52
  oauth2
50
- hashie (2.0.5)
51
- highline (1.6.20)
52
- httpauth (0.2.0)
53
- i18n (0.6.9)
54
- jeweler (1.8.8)
53
+ hashie (3.3.1)
54
+ highline (1.6.21)
55
+ i18n (0.6.11)
56
+ jeweler (2.0.1)
55
57
  builder
56
- bundler (~> 1.0)
58
+ bundler (>= 1.0)
57
59
  git (>= 1.2.5)
58
- github_api (= 0.10.1)
60
+ github_api
59
61
  highline (>= 1.6.15)
60
- nokogiri (= 1.5.10)
62
+ nokogiri (>= 1.5.10)
61
63
  rake
62
64
  rdoc
63
65
  json (1.8.1)
64
- jwt (0.1.8)
65
- multi_json (>= 1.5)
66
- minitest (5.3.3)
67
- multi_json (1.8.2)
68
- multi_test (0.0.2)
66
+ jwt (1.0.0)
67
+ mini_portile (0.6.0)
68
+ minitest (5.4.1)
69
+ multi_json (1.10.1)
70
+ multi_test (0.1.1)
69
71
  multi_xml (0.5.5)
70
- multipart-post (1.2.0)
72
+ multipart-post (2.0.0)
71
73
  mysql (2.9.1)
72
- nokogiri (1.5.10)
73
- oauth2 (0.9.2)
74
- faraday (~> 0.8)
75
- httpauth (~> 0.2)
76
- jwt (~> 0.1.4)
77
- multi_json (~> 1.0)
74
+ nokogiri (1.6.3.1)
75
+ mini_portile (= 0.6.0)
76
+ oauth2 (1.0.0)
77
+ faraday (>= 0.8, < 0.10)
78
+ jwt (~> 1.0)
79
+ multi_json (~> 1.3)
78
80
  multi_xml (~> 0.5)
79
81
  rack (~> 1.2)
80
82
  rack (1.5.2)
81
83
  rack-test (0.6.2)
82
84
  rack (>= 1.0)
83
- rake (10.1.0)
84
- rdoc (4.0.1)
85
+ rake (10.3.2)
86
+ rdoc (4.1.2)
85
87
  json (~> 1.4)
86
- rspec (2.14.1)
87
- rspec-core (~> 2.14.0)
88
- rspec-expectations (~> 2.14.0)
89
- rspec-mocks (~> 2.14.0)
90
- rspec-core (2.14.7)
91
- rspec-expectations (2.14.4)
92
- diff-lcs (>= 1.1.3, < 2.0)
93
- rspec-mocks (2.14.4)
94
- thread_safe (0.3.3)
95
- tzinfo (1.1.0)
88
+ rspec (3.1.0)
89
+ rspec-core (~> 3.1.0)
90
+ rspec-expectations (~> 3.1.0)
91
+ rspec-mocks (~> 3.1.0)
92
+ rspec-core (3.1.3)
93
+ rspec-support (~> 3.1.0)
94
+ rspec-expectations (3.1.1)
95
+ diff-lcs (>= 1.2.0, < 2.0)
96
+ rspec-support (~> 3.1.0)
97
+ rspec-mocks (3.1.0)
98
+ rspec-support (~> 3.1.0)
99
+ rspec-support (3.1.0)
100
+ thread_safe (0.3.4)
101
+ tzinfo (1.2.2)
96
102
  thread_safe (~> 0.1)
97
103
 
98
104
  PLATFORMS
99
105
  ruby
100
106
 
101
107
  DEPENDENCIES
102
- actionpack (~> 4.1.0)
103
- activerecord (~> 4.1.0)
104
- cucumber
105
- database_cleaner
106
- jeweler
107
- mysql
108
- rspec
108
+ actionpack (~> 4.1)
109
+ activerecord (~> 4.1)
110
+ cucumber (~> 1.3)
111
+ database_cleaner (~> 1.3)
112
+ jeweler (~> 2.0)
113
+ mysql (~> 2.9)
114
+ rspec (~> 3.1)
data/Rakefile CHANGED
@@ -19,22 +19,34 @@ begin
19
19
  gem.email = "developers@betterplace.org"
20
20
  gem.homepage = "http://github.com/betterplace/acts_as_account"
21
21
  gem.authors = ["Thies C. Arntzen, Norman Timmler, Matthias Frick, Phillip Oertel"]
22
+ gem.license = 'Apache-2.0'
22
23
  end
23
24
  Jeweler::GemcutterTasks.new
24
25
  rescue LoadError
25
26
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
26
27
  end
27
28
 
29
+ def connect_database
30
+ require 'rubygems'
31
+ require 'active_record'
32
+ access_data = YAML.load_file(File.dirname(__FILE__) + '/db/database.yml')['acts_as_account']
33
+ ActiveRecord::Base.establish_connection(Hash[access_data.select { |k, v| k != 'database'}]).connection
34
+ end
35
+
28
36
  namespace :features do
29
37
  desc "create test database out of db/schema.rb"
30
38
  task :create_database do
31
- require 'rubygems'
32
- require 'active_record'
33
- access_data = YAML.load_file(File.dirname(__FILE__) + '/db/database.yml')['acts_as_account']
34
- conn = ActiveRecord::Base.establish_connection(Hash[access_data.select { |k, v| k != 'database'}]).connection
39
+ conn = connect_database
35
40
  conn.execute('DROP DATABASE IF EXISTS acts_as_account')
36
41
  conn.execute('CREATE DATABASE acts_as_account')
37
42
  conn.execute('USE acts_as_account')
38
43
  load(File.dirname(__FILE__) + '/db/schema.rb')
39
44
  end
40
45
  end
46
+
47
+ desc "Run features"
48
+ task :features => :'features:create_database' do
49
+ ruby '-S', 'cucumber'
50
+ end
51
+
52
+ task :default => :features
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.0
1
+ 3.1.1
@@ -60,16 +60,16 @@ Gem::Specification.new do |s|
60
60
  s.specification_version = 4
61
61
 
62
62
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
63
- s.add_runtime_dependency(%q<activerecord>, ["~> 4.1.0"])
64
- s.add_runtime_dependency(%q<actionpack>, ["~> 4.1.0"])
63
+ s.add_runtime_dependency(%q<activerecord>, ["~> 4.1"])
64
+ s.add_runtime_dependency(%q<actionpack>, ["~> 4.1"])
65
65
  s.add_runtime_dependency(%q<database_cleaner>, [">= 0"])
66
66
  s.add_development_dependency(%q<rspec>, [">= 0"])
67
67
  s.add_development_dependency(%q<jeweler>, [">= 0"])
68
68
  s.add_development_dependency(%q<cucumber>, [">= 0"])
69
69
  s.add_development_dependency(%q<mysql>, [">= 0"])
70
70
  else
71
- s.add_dependency(%q<activerecord>, ["~> 4.1.0"])
72
- s.add_dependency(%q<actionpack>, ["~> 4.1.0"])
71
+ s.add_dependency(%q<activerecord>, ["~> 4.1"])
72
+ s.add_dependency(%q<actionpack>, ["~> 4.1"])
73
73
  s.add_dependency(%q<database_cleaner>, [">= 0"])
74
74
  s.add_dependency(%q<rspec>, [">= 0"])
75
75
  s.add_dependency(%q<jeweler>, [">= 0"])
@@ -77,8 +77,8 @@ Gem::Specification.new do |s|
77
77
  s.add_dependency(%q<mysql>, [">= 0"])
78
78
  end
79
79
  else
80
- s.add_dependency(%q<activerecord>, ["~> 4.1.0"])
81
- s.add_dependency(%q<actionpack>, ["~> 4.1.0"])
80
+ s.add_dependency(%q<activerecord>, ["~> 4.1"])
81
+ s.add_dependency(%q<actionpack>, ["~> 4.1"])
82
82
  s.add_dependency(%q<database_cleaner>, [">= 0"])
83
83
  s.add_dependency(%q<rspec>, [">= 0"])
84
84
  s.add_dependency(%q<jeweler>, [">= 0"])
@@ -1,3 +1,5 @@
1
+ require 'time'
2
+
1
3
  module ActsAsAccount
2
4
  class Posting < ActiveRecord::Base
3
5
  self.table_name = :acts_as_account_postings
@@ -11,5 +13,13 @@ module ActsAsAccount
11
13
  scope :haben, -> { where('amount < 0') }
12
14
  scope :start_date, -> date { where ['DATE(valuta) >= ?', date] }
13
15
  scope :end_date, -> date { where ['DATE(valuta) <= ?', date] }
16
+ scope :start_date, -> date {
17
+ date = Time.parse(date.to_s).utc.to_s(:db)
18
+ { :conditions => [ 'valuta >= ?', date ] }
19
+ }
20
+ scope :end_date, -> date {
21
+ date = Time.parse(date.to_s).utc.to_s(:db)
22
+ { :conditions => [ 'valuta <= ?', date ] }
23
+ }
14
24
  end
15
25
  end
metadata CHANGED
@@ -1,113 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_account
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thies C. Arntzen, Norman Timmler, Matthias Frick, Phillip Oertel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-19 00:00:00.000000000 Z
11
+ date: 2014-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 4.1.0
19
+ version: '4.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 4.1.0
26
+ version: '4.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: actionpack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 4.1.0
33
+ version: '4.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 4.1.0
40
+ version: '4.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: database_cleaner
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '1.3'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec
56
+ name: jeweler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '2.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '2.0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: jeweler
70
+ name: cucumber
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '1.3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '1.3'
83
83
  - !ruby/object:Gem::Dependency
84
- name: cucumber
84
+ name: mysql
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '2.9'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '2.9'
97
97
  - !ruby/object:Gem::Dependency
98
- name: mysql
98
+ name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '3.1'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '3.1'
111
111
  description: acts_as_account implements double entry accounting for Rails models.
112
112
  Your models get accounts and you can do consistent transactions between them. Since
113
113
  the documentation is sparse, see the transfer.feature for usage examples.
@@ -118,9 +118,10 @@ extra_rdoc_files:
118
118
  - LICENSE
119
119
  - README.rdoc
120
120
  files:
121
- - .ruby-gemset
122
- - .ruby-version
123
- - .specification
121
+ - ".ruby-gemset"
122
+ - ".ruby-version"
123
+ - ".specification"
124
+ - ".travis.yml"
124
125
  - CHANGELOG.md
125
126
  - Gemfile
126
127
  - Gemfile.lock
@@ -151,7 +152,8 @@ files:
151
152
  - lib/acts_as_account/posting.rb
152
153
  - lib/acts_as_account/transfer.rb
153
154
  homepage: http://github.com/betterplace/acts_as_account
154
- licenses: []
155
+ licenses:
156
+ - Apache-2.0
155
157
  metadata: {}
156
158
  post_install_message:
157
159
  rdoc_options: []
@@ -159,12 +161,12 @@ require_paths:
159
161
  - lib
160
162
  required_ruby_version: !ruby/object:Gem::Requirement
161
163
  requirements:
162
- - - '>='
164
+ - - ">="
163
165
  - !ruby/object:Gem::Version
164
166
  version: '0'
165
167
  required_rubygems_version: !ruby/object:Gem::Requirement
166
168
  requirements:
167
- - - '>='
169
+ - - ">="
168
170
  - !ruby/object:Gem::Version
169
171
  version: '0'
170
172
  requirements: []