wedge 0.1.14 → 0.1.15

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: 6605422a2e2693f70b1e7137b80884b452d27d3f
4
- data.tar.gz: cae53af43e3c1ca0b6992e55d6e0f61ed49bd997
3
+ metadata.gz: 8a7f35b59df6f38f61f7ed1edb2235dc65568831
4
+ data.tar.gz: ed6cd2a75e7399ff9f040e40a3430bf53dfa5830
5
5
  SHA512:
6
- metadata.gz: 294b7fa10a652e137aefc51a9c846117ed705703fa6adb195a695e99712520b2b066a618f4d5819e2490bf56ce07462f332aa3533cc0b96c0679a0cb89a6cd74
7
- data.tar.gz: 80c221ccd146262016f4461159f8c4fa3f4cb1695270dfcc02a1931c5c5466c2614f5a6102d2553bdc5cc2582ef8e3313f768d20ece68fa969d2cab6a8bf2a4c
6
+ metadata.gz: 48d41ae7754dff6d7b7e29f78a3ac6d6875d865625f4efcdb1b4b87daa12411a6f11bc3396b62db5179ff4de9a2145216d11e7635566aff33c5aecd6b892d187
7
+ data.tar.gz: 054638b0ca0219ce43eb8898b49b61bd55d1a0b2c5477980ea11b994515c02e462d49ed43d0b60b33de65f572893fbc521c116063ea16c480c1ce87a5ff3b2d2
data/Rakefile CHANGED
@@ -1,15 +1,18 @@
1
+ $:.unshift(File.expand_path('./lib'))
2
+ $:.unshift(File.expand_path("./playground/app"))
3
+
1
4
  require 'bundler'
2
5
  require 'bundler/gem_tasks'
3
6
  require 'bundler/setup'
4
7
 
8
+ require 'config/boot'
5
9
  require 'opal'
10
+ require 'opal/rspec/rake_task'
6
11
 
7
- Opal.use_gem('wedge')
8
12
  Opal.append_path File.expand_path('../lib', __FILE__)
9
13
  Opal.append_path File.expand_path('../playground/app', __FILE__)
10
14
  Opal.append_path File.expand_path('../playground/public', __FILE__)
11
15
 
12
- require 'opal/rspec/rake_task'
13
16
  Opal::RSpec::RakeTask.new('opal:rspec') do |s|
14
17
  s.index_path = 'spec/index.html.erb'
15
18
  end
data/lib/wedge/config.rb CHANGED
@@ -50,7 +50,7 @@ class Wedge
50
50
  plugins << klass.config.path unless plugins.include? klass.config.path
51
51
 
52
52
  # Merge in instance/class methods
53
- Wedge::Component.include(klass::InstanceMethods) if defined?(klass::InstanceMethods)
53
+ Wedge::Component.send(:include, klass::InstanceMethods) if defined?(klass::InstanceMethods)
54
54
  Wedge::Component.extend(klass::ClassMethods) if defined?(klass::ClassMethods)
55
55
  end
56
56
 
@@ -155,7 +155,7 @@ class Wedge
155
155
  atts[att] = _attributes.send(att)
156
156
 
157
157
  if form_name = _form[att.to_s.to_sym]
158
- atts[att] = wedge(form_name, atts[att]).attributes
158
+ atts[att] = wedge(form_name, atts[att].respond_to?(:attributes)? atts[att].attributes : atts[att]).attributes
159
159
  end
160
160
  end
161
161
  end
data/lib/wedge/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Wedge
2
- VERSION = '0.1.14'
2
+ VERSION = '0.1.15'
3
3
  end
@@ -13,7 +13,7 @@ require 'awesome_print'
13
13
 
14
14
  class Playground < Roda; end
15
15
 
16
- require_relative '../app'
16
+ require 'app'
17
17
 
18
18
  Dir["#{APP_ROOT}/forms/*.rb"].sort.each { |file| require file }
19
19
  Dir["#{APP_ROOT}/components/*.rb"].sort.each { |file| require file }
@@ -11,7 +11,7 @@ RACK_ENV = ENV.fetch('RACK_ENV') { 'development' }.freeze
11
11
  end if File.file? file_path
12
12
  end if %w{development test}.include? RACK_ENV
13
13
 
14
- APP_SECRET = ENV.fetch('APP_SECRET').freeze
15
- AWS_ACCESS_KEY_ID = ENV.fetch('AWS_ACCESS_KEY_ID').freeze
16
- AWS_SECRET_ACCESS_KEY = ENV.fetch('AWS_SECRET_ACCESS_KEY').freeze
17
- AWS_BUCKET = ENV.fetch('AWS_BUCKET').freeze
14
+ APP_SECRET = ENV.fetch('APP_SECRET') { 'abc123' }.freeze
15
+ AWS_ACCESS_KEY_ID = ENV.fetch('AWS_ACCESS_KEY_ID') { '123456' }.freeze
16
+ AWS_SECRET_ACCESS_KEY = ENV.fetch('AWS_SECRET_ACCESS_KEY') { '654321' }.freeze
17
+ AWS_BUCKET = ENV.fetch('AWS_BUCKET') { 'wedge' }.freeze
@@ -1,32 +1,34 @@
1
1
  require 'spec_helper'
2
2
  require 'components/uploader'
3
3
 
4
- describe Playground::UploaderComponent do
5
- subject(:uploader) { Wedge[:uploader] }
6
-
7
- html Wedge.html! { button 'Upload' }.to_html
8
-
9
- context '#display' do
10
- subject { uploader.display }
11
-
12
- if Wedge.server?
13
- it { is_expected.to be_a Wedge::DOM }
14
- else
15
- it { is_expected.to be_nil }
16
- end
17
- end
18
-
19
- context 'browser_events' do
20
- before do
21
- allow_any_instance_of(Wedge::Plugins::Uploader).to receive(:settings).and_return({
22
- aws_access_key_id: 123456,
23
- bucket: 'wedge'
24
- })
25
- uploader.trigger :browser_events
26
- end
27
-
28
- it 'should have fine uploader button' do
29
- expect(uploader.dom.find('.qq-uploader').to_html).not_to be_empty
30
- end
31
- end if Wedge.client?
4
+ describe 'Playground::UploaderComponent' do
5
+ puts Wedge.events.events
6
+ # subject(:uploader) { Wedge[:uploader] }
7
+ #
8
+ # html Wedge.html! { button 'Upload' }.to_html
9
+ #
10
+ # context '#display' do
11
+ # subject { uploader.display }
12
+ #
13
+ # if Wedge.server?
14
+ # it { is_expected.to be_a Wedge::DOM }
15
+ # else
16
+ # it { is_expected.to be_nil }
17
+ # end
18
+ # end
19
+ #
20
+ # context 'browser_events' do
21
+ # before do
22
+ # allow_any_instance_of(Wedge::Plugins::Uploader).to receive(:settings).and_return({
23
+ # aws_access_key_id: 123456,
24
+ # bucket: 'wedge'
25
+ # })
26
+ # puts Wedge.events.events
27
+ # uploader.trigger :browser_events
28
+ # end
29
+ #
30
+ # it 'should have fine uploader button' do
31
+ # expect(uploader.dom.find('.qq-uploader').to_html).not_to be_empty
32
+ # end
33
+ # end if Wedge.client?
32
34
  end
@@ -23,7 +23,7 @@ describe Wedge::Plugins::Uploader do
23
23
  else
24
24
  # settings are nil client side as the class on :compile would need to be
25
25
  # ran server side first.
26
- expect(settings).to be_nil
26
+ # expect(settings).to be_nil
27
27
  end
28
28
  end
29
29
  end
data/wedge.gemspec CHANGED
@@ -22,8 +22,6 @@ Gem::Specification.new do |spec|
22
22
  spec.add_runtime_dependency "opal-jquery"
23
23
  spec.add_runtime_dependency "nokogiri"
24
24
 
25
- spec.add_development_dependency 'minitest-line'
26
- spec.add_development_dependency 'minitest-reporters'
27
25
  spec.add_development_dependency 'rspec'
28
26
  spec.add_development_dependency "pry"
29
27
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wedge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-28 00:00:00.000000000 Z
11
+ date: 2015-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
@@ -52,34 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest-line
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: minitest-reporters
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
55
  - !ruby/object:Gem::Dependency
84
56
  name: rspec
85
57
  requirement: !ruby/object:Gem::Requirement