action_widget 0.7.0 → 0.8.0

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: 07808bff8dbfd4db751ce2a37bf217694fc86fc2
4
- data.tar.gz: 654676cf8cc26a82c4a0352ff2d64f19d0f866c5
3
+ metadata.gz: be79e5ca5532c6047d471857cfc5a8f7ee87410e
4
+ data.tar.gz: 3cad04dc423d1a573671286cdcc104515aafec80
5
5
  SHA512:
6
- metadata.gz: b7978810a990ed931e353c5558a1ed80ff7fc0ffb24c126f7284aa59c1c2f3130a3d756a6dd22316b295c666853ef8fd94cd9843a8a778a9a99a42c2e14b850e
7
- data.tar.gz: 5affa9d5a48b0d771d83c6e1643f3e96784c13bc188900023cdf0410d1537969caa820003600eb1521a86866d0780bcddc6646975cf0da81b74abb83e557067a
6
+ metadata.gz: 5c52f486e2af4ebcc2c1634398cebcd0729acaed72c1ae02f0e8355efb2cda86b912546fb8d9a3747a9b9cbf15e456ab17cd9382ecb3ce0e809f66537fce3146
7
+ data.tar.gz: b7efc419ade14ed4b9593ec035f99500bf73fe36fd2a4cddef59dea8148210855b98d205b5fdb199120f40d78875d5c2ed1140fde1423837c0c33af1fb3d410b
@@ -15,6 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.version = ActionWidget::VERSION
16
16
 
17
17
  gem.add_dependency 'smart_properties', '~> 1.10'
18
+ gem.add_dependency 'activesupport', '> 2.2'
18
19
 
19
20
  gem.add_development_dependency 'pry'
20
21
  gem.add_development_dependency 'rake', '~> 10.0'
@@ -1,4 +1,5 @@
1
1
  require 'smart_properties'
2
+ require 'active_support/core_ext/string'
2
3
 
3
4
  module ActionWidget
4
5
  class << self
@@ -1,22 +1,27 @@
1
+ require 'active_support/dependencies'
2
+
1
3
  module ActionWidget
2
- module Extensions
3
- module Middleman
4
-
5
- class << self
6
-
7
- def register!
8
- ::Middleman::Extensions.register(:action_widget, self)
9
- end
10
-
11
- def registered(app)
12
- app.send(:include, ::ActionWidget::ViewHelper)
13
- end
14
- alias included registered
15
-
4
+ module Extensions
5
+ class Middleman < Middleman::Extension
6
+ def self.register
7
+ ::Middleman::Extensions.register(:action_widget, self)
8
+ end
9
+
10
+ option :path
11
+
12
+ def initialize(app, *)
13
+ super
14
+ options.path ||= File.join(app.root, 'lib')
15
+ raise ArgumentError, "Expected path to point to a directory" unless File.directory?(options.path)
16
+ end
17
+
18
+ def after_configuration
19
+ ActiveSupport::Dependencies.autoload_paths |= [options.path]
20
+ ActiveSupport::Dependencies.clear
21
+ app.helpers(::ActionWidget::ViewHelper)
16
22
  end
17
-
18
23
  end
19
24
  end
20
25
  end
21
26
 
22
- ActionWidget::Extensions::Middleman.register!
27
+ ActionWidget::Extensions::Middleman.register
@@ -1,3 +1,3 @@
1
1
  module ActionWidget
2
- VERSION = '0.7.0'
2
+ VERSION = '0.8.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_widget
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Tennhard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-05 00:00:00.000000000 Z
11
+ date: 2015-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: smart_properties
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: activesupport
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.2'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: pry
29
43
  requirement: !ruby/object:Gem::Requirement