let 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.3
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{let}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Howard Yeh"]
@@ -24,8 +24,9 @@ Gem::Specification.new do |s|
24
24
  "README.markdown",
25
25
  "Rakefile",
26
26
  "VERSION",
27
+ "let.gemspec",
27
28
  "lib/let.rb",
28
- "rails/init.rb",
29
+ "lib/let/railtie.rb",
29
30
  "spec/let_spec.rb",
30
31
  "spec/spec_helper.rb"
31
32
  ]
data/lib/let.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Let
2
+ require 'let/railtie' if defined?(Rails)
2
3
  def self.included(klass)
3
4
  klass.extend ClassMethods
4
5
  end
@@ -19,3 +20,4 @@ module Let
19
20
  end
20
21
  end
21
22
  end
23
+
@@ -0,0 +1,11 @@
1
+ require 'let'
2
+ require 'rails'
3
+ module Let
4
+ class Railtie < Rails::Railtie
5
+ railtie_name :let
6
+ initializer "let.includes_all_your_bases" do
7
+ ActiveRecord::Base.send :include, Let
8
+ ActionController::Base.send :include, Let
9
+ end
10
+ end
11
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: let
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Howard Yeh
@@ -97,10 +97,9 @@ files:
97
97
  - README.markdown
98
98
  - Rakefile
99
99
  - VERSION
100
- - init.rb
101
100
  - let.gemspec
102
101
  - lib/let.rb
103
- - rails/init.rb
102
+ - lib/let/railtie.rb
104
103
  - spec/let_spec.rb
105
104
  - spec/spec_helper.rb
106
105
  has_rdoc: true
data/init.rb DELETED
@@ -1,3 +0,0 @@
1
- require 'let'
2
- ActiveRecord::Base.send(:include,Let)
3
- ActionController::Base.send(:include,Let)
@@ -1,3 +0,0 @@
1
- require 'let'
2
- ActiveRecord::Base.send(:include,Let)
3
- ActionController::Base.send(:include,Let)