mcfly 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -31,10 +31,10 @@ Or add it to your `Gemfile`, etc.
31
31
  ## Usage
32
32
 
33
33
  To create Mcfly enabled tables, they need to be created using
34
- `McFly::McFlyMigration` or `McFly::McFlyAppendOnlyMigration` instead
34
+ `Mcfly::McflyMigration` or `Mcfly::McflyAppendOnlyMigration` instead
35
35
  of the usual `ActiveRecord::Migration`.
36
36
 
37
- class CreateSecurityInstruments < McFlyAppendOnlyMigration
37
+ class CreateSecurityInstruments < McflyAppendOnlyMigration
38
38
  def change
39
39
  create_table :security_instruments do |t|
40
40
  t.string :name, null: false
@@ -43,7 +43,7 @@ of the usual `ActiveRecord::Migration`.
43
43
  end
44
44
  end
45
45
 
46
- class CreateMarketPrices < McFlyMigration
46
+ class CreateMarketPrices < McflyMigration
47
47
  def change
48
48
  create_table :market_prices do |t|
49
49
  t.references :security_instrument, null: false
data/lib/mcfly.rb CHANGED
@@ -31,7 +31,7 @@ end
31
31
 
32
32
  ActiveSupport.on_load(:active_record) do
33
33
  include Delorean::Model
34
- include McFly::Model
34
+ include Mcfly::Model
35
35
  end
36
36
 
37
37
  ActiveSupport.on_load(:action_controller) do
@@ -1,6 +1,6 @@
1
1
  require 'delorean_lang'
2
2
 
3
- module McFly
3
+ module Mcfly
4
4
  module Model
5
5
 
6
6
  class AssociationValidator < ActiveModel::Validator
@@ -28,7 +28,7 @@ module McFly
28
28
  # FIXME: this methods gets a append_only option sometimes. It
29
29
  # needs to add model level validations which prevent update
30
30
  # when this option is present. Note that we need to allow
31
- # delete. Deletion of McFly objects obsoletes them by setting
31
+ # delete. Deletion of Mcfly objects obsoletes them by setting
32
32
  # obsoleted_dt.
33
33
 
34
34
  send :include, InstanceMethods
@@ -74,7 +74,7 @@ module McFly
74
74
  end
75
75
 
76
76
  def mcfly_belongs_to(name, options = {})
77
- validates_with McFly::Model::AssociationValidator, field: name
77
+ validates_with Mcfly::Model::AssociationValidator, field: name
78
78
  belongs_to(name, options)
79
79
  end
80
80
 
@@ -1,4 +1,4 @@
1
- class McFlyMigration < ActiveRecord::Migration
1
+ class McflyMigration < ActiveRecord::Migration
2
2
  INSERT_TRIG, UPDATE_TRIG, UPDATE_APPEND_ONLY_TRIG, DELETE_TRIG =
3
3
  %w{insert_trig update_trig update_append_only_trig delete_trig}.map { |f|
4
4
  File.read(File.dirname(__FILE__) + "/#{f}.sql")
@@ -22,7 +22,7 @@ class McFlyMigration < ActiveRecord::Migration
22
22
  end
23
23
  end
24
24
 
25
- class McFlyAppendOnlyMigration < McFlyMigration
25
+ class McflyAppendOnlyMigration < McflyMigration
26
26
  # append-only update trigger disallows updates
27
27
  TRIGS = [INSERT_TRIG, UPDATE_APPEND_ONLY_TRIG, DELETE_TRIG]
28
28
  end
data/lib/mcfly/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mcfly
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -1,4 +1,4 @@
1
- class CreateSecurityInstruments < McFlyAppendOnlyMigration
1
+ class CreateSecurityInstruments < McflyAppendOnlyMigration
2
2
  def change
3
3
  create_table :security_instruments do |t|
4
4
  t.string :name, null: false
@@ -1,6 +1,6 @@
1
1
  require 'mcfly'
2
2
 
3
- class CreateMarketPrices < McFlyMigration
3
+ class CreateMarketPrices < McflyMigration
4
4
  def change
5
5
  create_table :market_prices do |t|
6
6
  t.references :security_instrument, null: false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mcfly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-07 00:00:00.000000000 Z
12
+ date: 2013-08-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails