widgets 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,14 @@
1
+ module ApplicationHelper
2
+ def component(name, options={}, &block)
3
+ id = Guid.new.to_s
4
+ partial = File.join 'components', name.to_s
5
+ attributes = {:id => id, :'data-component' => name, :style => options.delete(:style), :class => options.delete(:effects)}
6
+ contents = if block_given?
7
+ render :layout => partial, :inline => capture(&block), :locals => options
8
+ else
9
+ render :template => partial, :locals => options
10
+ end
11
+
12
+ content_tag :div, contents, attributes
13
+ end
14
+ end
@@ -1,3 +1,3 @@
1
1
  module Widgets
2
- VERSION = "0.0.0"
2
+ VERSION = '0.0.1'
3
3
  end
data/lib/widgets.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Widgets
2
2
  class Engine < Rails::Engine
3
+ require File.expand_path '../../app/helpers/application_helper', __FILE__
3
4
  end
4
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: widgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
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-01-29 00:00:00.000000000 Z
12
+ date: 2013-01-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -27,6 +27,22 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: 3.2.11
30
+ - !ruby/object:Gem::Dependency
31
+ name: guid
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: rspec-rails
32
48
  requirement: !ruby/object:Gem::Requirement
@@ -43,6 +59,22 @@ dependencies:
43
59
  - - ! '>='
44
60
  - !ruby/object:Gem::Version
45
61
  version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: specstar-support-random
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 0.0.6
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 0.0.6
46
78
  - !ruby/object:Gem::Dependency
47
79
  name: sqlite3
48
80
  requirement: !ruby/object:Gem::Requirement
@@ -59,6 +91,22 @@ dependencies:
59
91
  - - ! '>='
60
92
  - !ruby/object:Gem::Version
61
93
  version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: webrat
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
62
110
  description:
63
111
  email:
64
112
  - sujoyg@gmail.com
@@ -66,6 +114,7 @@ executables: []
66
114
  extensions: []
67
115
  extra_rdoc_files: []
68
116
  files:
117
+ - app/helpers/application_helper.rb
69
118
  - lib/tasks/widgets_tasks.rake
70
119
  - lib/widgets/version.rb
71
120
  - lib/widgets.rb