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 +4 -4
- data/Rakefile +5 -2
- data/lib/wedge/config.rb +1 -1
- data/lib/wedge/plugins/form.rb +1 -1
- data/lib/wedge/version.rb +1 -1
- data/playground/app/config/boot.rb +1 -1
- data/playground/app/config/variables.rb +4 -4
- data/spec/playground/uploader_spec.rb +30 -28
- data/spec/wedge/plugins/uploader_spec.rb +1 -1
- data/wedge.gemspec +0 -2
- metadata +2 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a7f35b59df6f38f61f7ed1edb2235dc65568831
|
4
|
+
data.tar.gz: ed6cd2a75e7399ff9f040e40a3430bf53dfa5830
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
|
data/lib/wedge/plugins/form.rb
CHANGED
@@ -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
@@ -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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
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
|
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.
|
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-
|
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
|