mcfly 0.0.19 → 0.0.20

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: e5a2ed94848d3460cbf727f542510f3ad70b7a16
4
- data.tar.gz: cc1960246aca8ba7b598b0188c1ed739adb0addc
3
+ metadata.gz: 653de3547c41c9f073883dec130bb219ef3d19bf
4
+ data.tar.gz: 9f85fa1fec81d8e4375ad67e262c0bc8618e8aa8
5
5
  SHA512:
6
- metadata.gz: 3fa0d0b71637f7d32d69bf3769e0d26c0683d2d1599dbd37771e4bc840ff14627ae8adf64258bdb00f7ecb8d3318b24109b8682816cbba0dca617bc93ef47622
7
- data.tar.gz: 0bdd70da17caffe1b5648bc2b4895791bfef573a1d9a18e86410dafeeab8cc53ae0f2cf3901b0e66c34c8156bd8c95730efbb1f5c0112136c17fc4f343236739
6
+ metadata.gz: ca1cce82ec4f03030bf1655b196562ad62ccc08de0664dd6056997976df8f35f9b0e975c1fca33f5beeedee6418fbddf9b00132db331564781343e5e2be1f926
7
+ data.tar.gz: ee9b6717861484123dab28fd587d5bd74afb6abb0c593d4efbde3c29c91f75d4239003d47a1869eeac2c0524da03a9f1d680971bd6b31c00b8b3bdecfb24e1dd
@@ -1,93 +1,95 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mcfly (0.0.19)
4
+ mcfly (0.0.20)
5
5
  delorean_lang (~> 0.1)
6
6
  pg (~> 0.17)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (4.2.4)
12
- actionview (= 4.2.4)
13
- activesupport (= 4.2.4)
14
- rack (~> 1.6)
15
- rack-test (~> 0.6.2)
16
- rails-dom-testing (~> 1.0, >= 1.0.5)
11
+ actionpack (5.1.4)
12
+ actionview (= 5.1.4)
13
+ activesupport (= 5.1.4)
14
+ rack (~> 2.0)
15
+ rack-test (>= 0.6.3)
16
+ rails-dom-testing (~> 2.0)
17
17
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
18
- actionview (4.2.4)
19
- activesupport (= 4.2.4)
18
+ actionview (5.1.4)
19
+ activesupport (= 5.1.4)
20
20
  builder (~> 3.1)
21
- erubis (~> 2.7.0)
22
- rails-dom-testing (~> 1.0, >= 1.0.5)
23
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
- activemodel (4.2.4)
25
- activesupport (= 4.2.4)
26
- builder (~> 3.1)
27
- activerecord (4.2.4)
28
- activemodel (= 4.2.4)
29
- activesupport (= 4.2.4)
30
- arel (~> 6.0)
31
- activesupport (4.2.4)
21
+ erubi (~> 1.4)
22
+ rails-dom-testing (~> 2.0)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
24
+ activemodel (5.1.4)
25
+ activesupport (= 5.1.4)
26
+ activerecord (5.1.4)
27
+ activemodel (= 5.1.4)
28
+ activesupport (= 5.1.4)
29
+ arel (~> 8.0)
30
+ activesupport (5.1.4)
31
+ concurrent-ruby (~> 1.0, >= 1.0.2)
32
32
  i18n (~> 0.7)
33
- json (~> 1.7, >= 1.7.7)
34
33
  minitest (~> 5.1)
35
- thread_safe (~> 0.3, >= 0.3.4)
36
34
  tzinfo (~> 1.1)
37
- arel (6.0.4)
38
- builder (3.2.2)
39
- delorean_lang (0.3.22)
35
+ arel (8.0.0)
36
+ builder (3.2.3)
37
+ concurrent-ruby (1.0.5)
38
+ crass (1.0.3)
39
+ delorean_lang (0.3.34)
40
40
  activerecord (>= 3.2)
41
41
  treetop (~> 1.5)
42
- diff-lcs (1.2.5)
43
- erubis (2.7.0)
44
- i18n (0.7.0)
45
- json (1.8.3)
46
- loofah (2.0.3)
42
+ diff-lcs (1.3)
43
+ erubi (1.7.0)
44
+ i18n (0.9.1)
45
+ concurrent-ruby (~> 1.0)
46
+ loofah (2.1.1)
47
+ crass (~> 1.0.2)
47
48
  nokogiri (>= 1.5.9)
48
- mini_portile (0.6.2)
49
- minitest (5.8.1)
50
- nokogiri (1.6.6.2)
51
- mini_portile (~> 0.6.0)
52
- pg (0.19.0)
49
+ method_source (0.9.0)
50
+ mini_portile2 (2.3.0)
51
+ minitest (5.11.1)
52
+ nokogiri (1.8.1)
53
+ mini_portile2 (~> 2.3.0)
54
+ pg (0.21.0)
53
55
  polyglot (0.3.5)
54
- rack (1.6.4)
55
- rack-test (0.6.3)
56
- rack (>= 1.0)
57
- rails-deprecated_sanitizer (1.0.3)
58
- activesupport (>= 4.2.0.alpha)
59
- rails-dom-testing (1.0.7)
60
- activesupport (>= 4.2.0.beta, < 5.0)
61
- nokogiri (~> 1.6.0)
62
- rails-deprecated_sanitizer (>= 1.0.1)
63
- rails-html-sanitizer (1.0.2)
56
+ rack (2.0.3)
57
+ rack-test (0.8.2)
58
+ rack (>= 1.0, < 3)
59
+ rails-dom-testing (2.0.3)
60
+ activesupport (>= 4.2.0)
61
+ nokogiri (>= 1.6)
62
+ rails-html-sanitizer (1.0.3)
64
63
  loofah (~> 2.0)
65
- railties (4.2.4)
66
- actionpack (= 4.2.4)
67
- activesupport (= 4.2.4)
64
+ railties (5.1.4)
65
+ actionpack (= 5.1.4)
66
+ activesupport (= 5.1.4)
67
+ method_source
68
68
  rake (>= 0.8.7)
69
69
  thor (>= 0.18.1, < 2.0)
70
- rake (10.4.2)
71
- rspec-collection_matchers (1.1.2)
72
- rspec-expectations (>= 2.99.0.beta1)
73
- rspec-core (2.99.2)
74
- rspec-expectations (2.99.2)
75
- diff-lcs (>= 1.1.3, < 2.0)
76
- rspec-mocks (2.99.4)
77
- rspec-rails (2.99.0)
70
+ rake (12.3.0)
71
+ rspec-core (3.7.1)
72
+ rspec-support (~> 3.7.0)
73
+ rspec-expectations (3.7.0)
74
+ diff-lcs (>= 1.2.0, < 2.0)
75
+ rspec-support (~> 3.7.0)
76
+ rspec-mocks (3.7.0)
77
+ diff-lcs (>= 1.2.0, < 2.0)
78
+ rspec-support (~> 3.7.0)
79
+ rspec-rails (3.7.2)
78
80
  actionpack (>= 3.0)
79
- activemodel (>= 3.0)
80
81
  activesupport (>= 3.0)
81
82
  railties (>= 3.0)
82
- rspec-collection_matchers
83
- rspec-core (~> 2.99.0)
84
- rspec-expectations (~> 2.99.0)
85
- rspec-mocks (~> 2.99.0)
86
- thor (0.19.1)
87
- thread_safe (0.3.5)
88
- treetop (1.6.8)
83
+ rspec-core (~> 3.7.0)
84
+ rspec-expectations (~> 3.7.0)
85
+ rspec-mocks (~> 3.7.0)
86
+ rspec-support (~> 3.7.0)
87
+ rspec-support (3.7.0)
88
+ thor (0.20.0)
89
+ thread_safe (0.3.6)
90
+ treetop (1.6.9)
89
91
  polyglot (~> 0.3)
90
- tzinfo (1.2.2)
92
+ tzinfo (1.2.4)
91
93
  thread_safe (~> 0.1)
92
94
 
93
95
  PLATFORMS
@@ -95,7 +97,7 @@ PLATFORMS
95
97
 
96
98
  DEPENDENCIES
97
99
  mcfly!
98
- rspec-rails (~> 2.99)
100
+ rspec-rails (~> 3.0)
99
101
 
100
102
  BUNDLED WITH
101
- 1.13.6
103
+ 1.16.1
@@ -1,7 +1,7 @@
1
1
  module Mcfly
2
2
  module Controller
3
3
  def self.included(base)
4
- base.before_filter :set_mcfly_whodunnit
4
+ base.before_action :set_mcfly_whodunnit
5
5
  end
6
6
 
7
7
  # Returns the user who is responsible for any changes that occur.
@@ -44,7 +44,7 @@ module Mcfly
44
44
  return if value.nil?
45
45
 
46
46
  unless VALSET.member?(value.obsoleted_dt)
47
- entry.errors[field] = "Obsoleted association value!"
47
+ entry.errors[field] << "Obsoleted association value!"
48
48
  end
49
49
  end
50
50
  end
@@ -146,11 +146,13 @@ module Mcfly
146
146
  # checks against registered associations
147
147
  if self.class.class_variable_defined?(:@@associations)
148
148
  self.class.class_variable_get(:@@associations).each do |klass, fk|
149
- self.errors.add :base,
150
- "#{self.class.name.demodulize} can't be deleted " +
151
- "because #{klass.name.demodulize} records exist" if
152
- klass.where("obsoleted_dt = ? AND #{fk} = ?",
153
- 'infinity', self.id).count > 0
149
+ if klass.where("obsoleted_dt = ? AND #{fk} = ?",
150
+ 'infinity', self.id).exists?
151
+ self.errors.add(:base,
152
+ "#{self.class.name.demodulize} can't be deleted "\
153
+ "because #{klass.name.demodulize} records exist")
154
+ throw :abort
155
+ end
154
156
  end
155
157
  end
156
158
 
@@ -1,4 +1,4 @@
1
- class McflyMigration < ActiveRecord::Migration
1
+ class McflyMigration < ActiveRecord::Migration[4.2]
2
2
  INSERT_TRIG, UPDATE_TRIG, UPDATE_APPEND_ONLY_TRIG, DELETE_TRIG, CONSTRAINT =
3
3
  %w{
4
4
  insert_trig
@@ -1,3 +1,3 @@
1
1
  module Mcfly
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
@@ -22,5 +22,5 @@ Gem::Specification.new do |s|
22
22
  # remove the dependency on delorean_fn.
23
23
  s.add_dependency "delorean_lang", '~> 0.1'
24
24
 
25
- s.add_development_dependency "rspec-rails", "~> 2.99"
25
+ s.add_development_dependency "rspec-rails", "~> 3.0"
26
26
  end
@@ -1,40 +1,12 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
-
3
- # Pick the frameworks you want:
4
2
  require "active_record/railtie"
5
3
  require "action_controller/railtie"
6
- # require "action_mailer/railtie"
7
- # require "active_resource/railtie"
8
- # require "sprockets/railtie"
9
- # require "rails/test_unit/railtie"
10
4
 
11
5
  Bundler.require
12
6
  require "mcfly"
13
7
 
14
8
  module Dummy
15
9
  class Application < Rails::Application
16
- # Settings in config/environments/* take precedence over those specified here.
17
- # Application configuration should go into files in config/initializers
18
- # -- all .rb files in that directory are automatically loaded.
19
-
20
- # Custom directories with classes and modules you want to be autoloadable.
21
- # config.autoload_paths += %W(#{config.root}/extras)
22
-
23
- # Only load the plugins named here, in the order given (default is alphabetical).
24
- # :all can be used as a placeholder for all plugins not explicitly named.
25
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
26
-
27
- # Activate observers that should always be running.
28
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
29
-
30
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
31
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
32
- # config.time_zone = 'Central Time (US & Canada)'
33
-
34
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
35
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
36
- # config.i18n.default_locale = :de
37
-
38
10
  # Configure the default encoding used in templates for Ruby 1.9.
39
11
  config.encoding = "utf-8"
40
12
 
@@ -44,17 +16,6 @@ module Dummy
44
16
  # Enable escaping HTML in JSON.
45
17
  config.active_support.escape_html_entities_in_json = true
46
18
 
47
- # Use SQL instead of Active Record's schema dumper when creating the database.
48
- # This is necessary if your schema can't be completely dumped by the schema dumper,
49
- # like if you have constraints or database-specific column types
50
- # config.active_record.schema_format = :sql
51
-
52
- # Enable the asset pipeline
53
- config.assets.enabled = true
54
-
55
- # Version of your assets, change this if you want to expire all your assets
56
- config.assets.version = '1.0'
57
-
58
19
  config.i18n.enforce_available_locales = true
59
20
  end
60
21
  end
@@ -2,4 +2,4 @@
2
2
  require File.expand_path('../application', __FILE__)
3
3
 
4
4
  # Initialize the rails application
5
- Dummy::Application.initialize!
5
+ INITIALIZED ||= Dummy::Application.initialize!
@@ -14,7 +14,7 @@ Dummy::Application.configure do
14
14
  config.action_controller.perform_caching = false
15
15
 
16
16
  # Don't care if the mailer can't send
17
- config.action_mailer.raise_delivery_errors = false
17
+ # config.action_mailer.raise_delivery_errors = false
18
18
 
19
19
  # Print deprecation notices to the Rails logger
20
20
  config.active_support.deprecation = :log
@@ -24,13 +24,13 @@ Dummy::Application.configure do
24
24
 
25
25
  # Log the query plan for queries taking more than this (works
26
26
  # with SQLite, MySQL, and PostgreSQL)
27
- config.active_record.auto_explain_threshold_in_seconds = 0.5
27
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
28
28
 
29
29
  # Do not compress assets
30
- config.assets.compress = false
30
+ # config.assets.compress = false
31
31
 
32
32
  # Expands the lines which load the assets
33
- config.assets.debug = true
33
+ # config.assets.debug = true
34
34
 
35
35
  config.eager_load = false
36
36
  end
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  # This file is auto-generated from the current state of the database. Instead
3
2
  # of editing this file, please use the migrations feature of Active Record to
4
3
  # incrementally modify your database, and then regenerate this schema definition.
@@ -9,31 +8,34 @@
9
8
  # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
9
  # you'll amass, the slower it'll run and the greater likelihood for issues).
11
10
  #
12
- # It's strongly recommended to check this file into your version control system.
11
+ # It's strongly recommended that you check this file into your version control system.
13
12
 
14
- ActiveRecord::Schema.define(:version => 2) do
13
+ ActiveRecord::Schema.define(version: 2) do
15
14
 
16
- create_table "market_prices", :force => true do |t|
17
- t.integer "group_id", :null => false
18
- t.datetime "created_dt", :null => false
19
- t.datetime "obsoleted_dt", :null => false
20
- t.integer "user_id", :null => false
21
- t.integer "o_user_id"
22
- t.integer "security_instrument_id", :null => false
23
- t.decimal "coupon", :null => false
24
- t.integer "settlement_mm", :null => false
25
- t.integer "settlement_yy", :null => false
26
- t.decimal "price"
15
+ # These are extensions that must be enabled in order to support this database
16
+ enable_extension "plpgsql"
17
+
18
+ create_table "market_prices", id: :serial, force: :cascade do |t|
19
+ t.integer "group_id", null: false
20
+ t.datetime "created_dt", null: false
21
+ t.datetime "obsoleted_dt", null: false
22
+ t.integer "user_id", null: false
23
+ t.integer "o_user_id"
24
+ t.integer "security_instrument_id", null: false
25
+ t.decimal "coupon", null: false
26
+ t.integer "settlement_mm", null: false
27
+ t.integer "settlement_yy", null: false
28
+ t.decimal "price"
27
29
  end
28
30
 
29
- create_table "security_instruments", :force => true do |t|
30
- t.integer "group_id", :null => false
31
- t.datetime "created_dt", :null => false
32
- t.datetime "obsoleted_dt", :null => false
33
- t.integer "user_id", :null => false
34
- t.integer "o_user_id"
35
- t.string "name", :null => false
36
- t.string "settlement_class", :limit => 1, :null => false
31
+ create_table "security_instruments", id: :serial, force: :cascade do |t|
32
+ t.integer "group_id", null: false
33
+ t.datetime "created_dt", null: false
34
+ t.datetime "obsoleted_dt", null: false
35
+ t.integer "user_id", null: false
36
+ t.integer "o_user_id"
37
+ t.string "name", null: false
38
+ t.string "settlement_class", limit: 1, null: false
37
39
  end
38
40
 
39
41
  end
@@ -1 +1 @@
1
- ../../spec/
1
+ spec/dummy/../../spec/
@@ -1,7 +1,7 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe "Mcfly" do
4
- self.use_transactional_fixtures = false
4
+ self.use_transactional_tests = false
5
5
 
6
6
  after(:each) do
7
7
  ActiveRecord::Base.connection.execute("TRUNCATE security_instruments;")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mcfly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arman Bostani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-23 00:00:00.000000000 Z
11
+ date: 2018-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.99'
47
+ version: '3.0'
48
48
  type: :development
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: '2.99'
54
+ version: '3.0'
55
55
  description: A database table versioning system.
56
56
  email:
57
57
  - arman.bostani@pnmac.com
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.5.2
143
+ rubygems_version: 2.6.14
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: A database table versioning system.