adyen-skinbuilder 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -1,3 +1,3 @@
1
1
  pkg
2
+ .adyenrc
2
3
  .rvmrc
3
- .adyenrc
@@ -4,10 +4,21 @@
4
4
  * multiple user, assets upload, hosted system
5
5
 
6
6
  ## Todo
7
- * beautify index page, add 'new', 'edit', 'download'
7
+ * beautify index page, add 'new', 'edit'
8
8
  * add locale support
9
9
  * add more functions to binary to get a proper CLI tool (or move to adyen-admin??)
10
10
  * more helper e.g. cutom fields
11
+ * auto concatinate multiple .js files
12
+ * auto concatinate multiple .css files
13
+ * auto build example PaymentMethod skeleton
14
+ * support new CSS selectors
15
+
16
+ ## v0.3.1
17
+ * feature: see remote version
18
+ * feature: read skin code from skin.yaml file
19
+ * fix skincode name
20
+ * fix relative skin path
21
+ * fix non existing link to setup remote admin
11
22
  * auto re-login when session timed out
12
23
 
13
24
  ## v0.3.0
@@ -15,6 +26,7 @@
15
26
  * show local / remote skins, option to sync
16
27
  * add skin upload -> 'adyen-admin'
17
28
  * add skin export
29
+ * added action 'download'
18
30
  * gemify
19
31
  * add custom skin path
20
32
  * add order_data
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- adyen-skinbuilder (0.3.0.rc2)
4
+ adyen-skinbuilder (0.3.1)
5
5
  adyen-admin
6
6
  sinatra
7
7
  sinatra-contrib
@@ -10,7 +10,7 @@ PATH
10
10
  GEM
11
11
  remote: http://rubygems.org/
12
12
  specs:
13
- adyen-admin (0.0.7)
13
+ adyen-admin (0.0.12)
14
14
  mechanize
15
15
  rubyzip
16
16
  backports (2.5.1)
@@ -24,7 +24,7 @@ GEM
24
24
  thor (~> 0.14.6)
25
25
  guard-rspec (0.7.0)
26
26
  guard (>= 0.10.0)
27
- mechanize (2.3)
27
+ mechanize (2.4)
28
28
  domain_name (~> 0.5, >= 0.5.1)
29
29
  mime-types (~> 1.17, >= 1.17.2)
30
30
  net-http-digest_auth (~> 1.1, >= 1.1.1)
@@ -8,7 +8,7 @@ opts = {}
8
8
 
9
9
 
10
10
  if (skins = ARGV.last) && File.directory?(skins)
11
- opts[:skins_directory] = skins
11
+ opts[:skins_directory] = File.expand_path(skins)
12
12
 
13
13
  begin
14
14
  skin = Adyen::Admin::Skin.new(:path => skins) #auto launch skin
@@ -23,6 +23,9 @@ module Adyen
23
23
  #
24
24
  # def adyen_custom_hidden_tag
25
25
  # end
26
+
27
+ ## autofill cc
28
+ ## autofill avs
26
29
  end
27
30
  end
28
31
  end
@@ -17,13 +17,13 @@ module Adyen
17
17
 
18
18
  # renders a file from the inc folder of the skin
19
19
  def render_file(file)
20
- file = skin_path @skin_code, "/inc/#{file}.txt"
20
+ file = File.join(@skin.path, "inc/#{file}.txt")
21
21
  File.read(file) if File.exists?(file)
22
22
  end
23
23
 
24
24
  # render an erb partial inline
25
25
  def render_partial(file, locals = {})
26
- views = locals.delete(:views) || skin_path(@skin_code)
26
+ views = locals.delete(:views) || @skin.path
27
27
  erb "_#{file}.html".to_sym, :layout => false, :views => views, :locals => locals
28
28
  end
29
29
  end
@@ -25,6 +25,7 @@ module Adyen
25
25
 
26
26
  def skins_directory
27
27
  @@skins_directory ||= begin
28
+ # check if it's a skin, if so use dirname
28
29
  Adyen::Admin::Skin.new(:path => settings.skins_directory)
29
30
  File.dirname(settings.skins_directory)
30
31
  rescue ArgumentError
@@ -32,41 +33,33 @@ module Adyen
32
33
  end
33
34
  end
34
35
 
35
- def skin_path(*path)
36
- File.join(skins_directory, *path)
37
- end
38
-
39
- def skin_file(skin_code)
40
- skin_path(skin_code, "skin.html").tap do |file|
36
+ def skin_file(skin, filename = "skin.html")
37
+ File.join(skin.path, filename).tap do |file|
41
38
  if !File.exists?("#{file}.erb")
42
- file.replace File.join(settings.views, "skin.html")
43
- end
44
- end
45
- end
46
-
47
- def store(output)
48
- output.scan(/<!-- ### inc\/([a-z]+) -->(.+?)<!-- ### -->/m) do |name, content|
49
- file = skin_path @skin_code, "/inc/#{name}.txt"
50
- `mkdir -p #{File.dirname(file)}`
51
- File.open(file, "w") do |f|
52
- f.write content.strip
39
+ return File.join(settings.views, filename)
53
40
  end
54
41
  end
55
42
  end
56
43
 
57
44
  def adyen_login
58
- if settings.adyen_admin_cfg && !Adyen::Admin.authenticated?
59
- cfg = settings.adyen_admin_cfg
45
+ if (cfg = settings.adyen_admin_cfg) && !Adyen::Admin.authenticated?
60
46
  Adyen::Admin.login(cfg[:accountname], cfg[:username], cfg[:password])
61
47
  end
62
48
  end
63
49
 
50
+ def render_skin(skin)
51
+ erb(skin_file(skin).to_sym, {
52
+ :views => '/',
53
+ :layout => File.join(settings.views, "layout.html").to_sym
54
+ })
55
+ end
56
+
64
57
  helpers Helper::Render, Helper::Adyen
65
58
 
66
59
  get '/sf/:skin_code/*' do |skin_code, path|
67
- if (file = skin_path(skin_code, path)) && File.exists?(file)
60
+ if (skin = Adyen::Admin::Skin.find(skin_code)) && (file = File.join(skin.path, path)) && File.exists?(file)
68
61
  send_file file
69
- elsif (file = skin_path("base", path)) && File.exists?(file)
62
+ elsif (file = File.join(skins_directory, "base", path)) && File.exists?(file)
70
63
  send_file file
71
64
  end
72
65
  end
@@ -83,46 +76,63 @@ module Adyen
83
76
  get '/favicon.ico' do
84
77
  end
85
78
 
86
- # skin page
87
- get '/:skin_code' do |skin_code|
88
- @skin_code = skin_code
89
-
90
- erb(skin_file(@skin_code).to_sym, {
91
- :views => '/',
92
- :layout => File.join(settings.views, "layout.html").to_sym
93
- }).tap do |output|
94
- if @skin = Adyen::Admin::Skin.new(:path => skin_path(skin_code))
95
- if params[:compile]
96
- store(output)
97
- send_file(@skin.compile) && return
98
- elsif params[:upload]
99
- store(output)
100
- adyen_login
101
- @skin.upload
102
- end
103
- end
79
+ get '/:skin_code/upload' do |skin_code|
80
+ if @skin = Adyen::Admin::Skin.find(skin_code)
81
+ output = render_skin @skin
82
+ @skin.compile(output)
83
+ @skin.upload
104
84
  end
85
+ redirect '/sync'
105
86
  end
106
87
 
107
- # cache remote skins
108
- @@skin_cache = nil
109
-
110
- # index page
111
- get '/' do
112
- Adyen::Admin::Skin.default_path = skin_path
113
- if params[:sync]
114
- Adyen::Admin::Skin.purge_cache
115
- adyen_login
116
- @@skin_cache = Adyen::Admin::Skin.all
117
- end
118
- if params[:download] && (@skin = Adyen::Admin::Skin.find(params[:download]))
88
+ get '/:skin_code/download' do |skin_code|
89
+ if @skin = Adyen::Admin::Skin.find(skin_code)
119
90
  @skin.download.tap do |zip_file|
120
91
  @skin.decompile(zip_file)
121
- `cp #{skin_file(@skin.code)}.erb #{@skin.path}`
92
+ `cp #{skin_file(@skin)}.erb #{@skin.path}`
122
93
  `rm -f #{zip_file}`
123
94
  end
124
95
  end
125
- @skins = @@skin_cache || Adyen::Admin::Skin.all_local
96
+ redirect '/'
97
+ end
98
+
99
+ get '/:skin_code/update' do |skin_code|
100
+ if @skin = Adyen::Admin::Skin.find(skin_code)
101
+ @skin.update
102
+ end
103
+ redirect '/sync'
104
+ end
105
+
106
+ get '/:skin_code/compile' do |skin_code|
107
+ if @skin = Adyen::Admin::Skin.find(skin_code)
108
+ output = render_skin @skin
109
+ @skin.compile(output)
110
+ send_file(@skin.compress)
111
+ else
112
+ redirect '/'
113
+ end
114
+ end
115
+
116
+ get '/sync' do
117
+ Adyen::Admin::Skin.default_path = skins_directory
118
+ Adyen::Admin::Skin.purge_cache
119
+ adyen_login
120
+ redirect '/'
121
+ end
122
+
123
+ # skin page
124
+ get '/:skin_code' do |skin_code|
125
+ if @skin = Adyen::Admin::Skin.find(skin_code)
126
+ render_skin @skin
127
+ else
128
+ redirect '/'
129
+ end
130
+ end
131
+
132
+ # index page
133
+ get '/' do
134
+ Adyen::Admin::Skin.default_path = skins_directory
135
+ @skins = Adyen::Admin::Skin.all
126
136
  @adyen_admin_cfg = settings.adyen_admin_cfg
127
137
 
128
138
  erb 'index.html'.to_sym, :layout => false
@@ -63,17 +63,17 @@
63
63
  <h1>Adyen Skins</h1>
64
64
 
65
65
  <% unless @adyen_admin_cfg %>
66
- <div class="warning">No Adyen Admin config found. Please create a <i>.adyenrc</i> with credentials, see <a href="">more details see here</a></div>
66
+ <div class="warning">No Adyen Admin config found. Please create a <i>.adyenrc</i> with credentials, see <a href="https://github.com/priithaamer/adyen-skinbuilder#interacting-with-remote-adyen-admin">more details see here</a></div>
67
67
  <% end %>
68
68
 
69
- Skins found in <i><%= skin_path %></i>
69
+ Skins found in <i><%= skins_directory %></i>
70
70
  <br>
71
71
 
72
72
  <table>
73
73
  <tr>
74
74
  <th>Status</th>
75
75
  <th>Name</th>
76
- <th>Code</th>
76
+ <th>Versions</th>
77
77
  <th>Action</th>
78
78
  <th>Remote</th>
79
79
  </tr>
@@ -84,17 +84,26 @@
84
84
  <%= "R" unless skin.frozen? %>
85
85
  <%= "L" if skin.path %>
86
86
  </td>
87
- <td><img src="https://ca-test.adyen.com/ca/img/icons/layout_content.png"><a href="/<%= File.basename(skin.path.to_s) %>"><%= skin.name || skin.code %></a></td>
88
- <td><%= skin.code %></td>
87
+ <td><a href="/<%= skin.code %>"><img src="https://ca-test.adyen.com/ca/img/icons/layout_content.png" border="0"><%= skin.name || skin.code %></a></td>
89
88
  <td>
90
- <% if @adyen_admin_cfg && !skin.frozen? %>
89
+ <% if !skin.frozen? %>
90
+ <%= skin.version %>
91
+ -
92
+ <%= skin.version_test %>
93
+ -
94
+ <%= skin.version_live %>
95
+ <% end %>
96
+ </td>
97
+ <td>
98
+ <% if Adyen::Admin.authenticated? && !skin.frozen? %>
91
99
  <% if skin.path %>
92
- <a href="/<%= File.basename(skin.path.to_s) %>?upload=true">upload</a>
100
+ <a href="/<%= skin.code %>/upload">upload</a>
93
101
  <% else %>
94
- <a href="/?download=<%= skin.code %>">download</a>
102
+ <a href="/<%= skin.code %>/download">download</a>
95
103
  <% end %>
104
+ <a href="/<%= skin.code %>/update">update</a>
96
105
  <% else %>
97
- <a href="/<%= File.basename(skin.path.to_s) %>?compile=true">compile</a>
106
+ <a href="/<%= skin.code %>/compile">compile</a>
98
107
  <% end %>
99
108
  </td>
100
109
  <td>
@@ -109,7 +118,7 @@
109
118
  </table>
110
119
 
111
120
  <% if @adyen_admin_cfg %>
112
- <a href="?sync=true">Sync with remote Adyen Admin<a>
121
+ <a href="/sync">Sync with remote Adyen Admin<a>
113
122
  <% end %>
114
123
  </div>
115
124
  </div>
@@ -1,17 +1,18 @@
1
1
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3
3
  <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Page Title</title>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <title><%= @skin.code %> - Adyen-Skinbuilder</title>
5
6
 
6
7
  <link rel="stylesheet" media="screen" type="text/css" href="/hpp/css/reset.css" />
7
8
 
8
- <link rel="stylesheet" media="screen" type="text/css" href="/sf/<%= @skin_code %>/css/screen.css" />
9
- <link rel="stylesheet" media="print" type="text/css" href="/sf/<%= @skin_code %>/css/print.css" />
9
+ <link rel="stylesheet" media="screen" type="text/css" href="/sf/<%= @skin.code %>/css/screen.css" />
10
+ <link rel="stylesheet" media="print" type="text/css" href="/sf/<%= @skin.code %>/css/print.css" />
10
11
 
11
12
  <script type="text/javascript" src="/hpp/js/default.js"></script>
12
- <script type="text/javascript" src="/sf/<%= @skin_code %>/js/custom.js"></script>
13
+ <script type="text/javascript" src="/sf/<%= @skin.code %>/js/custom.js"></script>
13
14
  <!--[if lt IE 7]>
14
- <link rel="stylesheet" type="text/css" href="/sf/<%= @skin_code %>/css/screen_ie6.css" />
15
+ <link rel="stylesheet" type="text/css" href="/sf/<%= @skin.code %>/css/screen_ie6.css" />
15
16
  <![endif]-->
16
17
  </head>
17
18
  <body>
@@ -1,5 +1,5 @@
1
1
  module Adyen
2
2
  module Skinbuilder
3
- VERSION = '0.3.0'
3
+ VERSION = '0.3.1'
4
4
  end
5
5
  end
@@ -6,7 +6,7 @@ describe 'SkinBuilder server' do
6
6
  include Rack::Test::Methods
7
7
 
8
8
  let(:skins_directory) { File.expand_path(File.join(File.dirname(__FILE__), '../../fixtures/skins')) }
9
- let(:skin_code) { "/DV3tf95f" }
9
+ let(:skin_code) { "DV3tf95f" }
10
10
 
11
11
  def app
12
12
  Adyen::SkinBuilder::Server.tap do |app|
@@ -16,13 +16,15 @@ describe 'SkinBuilder server' do
16
16
 
17
17
  before do
18
18
  Adyen::Admin.stub(:login)
19
+ Adyen::Admin::Skin.purge_cache
20
+ Adyen::Admin::Skin.default_path = skins_directory
19
21
  end
20
22
 
21
23
  describe 'assets' do
22
24
  let(:file) { '/css/screen.css' }
23
25
 
24
26
  before(:each) do
25
- get "/sf" + skin_code + file
27
+ get File.join( "/sf", skin_code, file)
26
28
  end
27
29
 
28
30
  it 'responds with 200 status' do
@@ -34,7 +36,7 @@ describe 'SkinBuilder server' do
34
36
  end
35
37
 
36
38
  it 'returns file content' do
37
- last_response.body.should == File.read(skins_directory + skin_code + file)
39
+ last_response.body.should == File.read(File.join(skins_directory, skin_code, file))
38
40
  end
39
41
 
40
42
  context 'file not available, falls back to base' do
@@ -54,130 +56,132 @@ describe 'SkinBuilder server' do
54
56
  end
55
57
  end
56
58
 
57
- describe 'GET /' do
58
- context "split files skin" do
59
+ describe 'GET' do
60
+ describe '/' do
61
+ let(:path) { '/' }
62
+
59
63
  before(:each) do
60
64
  get path
61
65
  end
62
66
 
63
- describe "index" do
64
- let(:path) { '/' }
65
-
66
- it 'responds with 200 status' do
67
- last_response.status.should == 200
68
- end
67
+ it 'responds with 200 status' do
68
+ last_response.status.should == 200
69
+ end
69
70
 
70
- it 'returns adyen skeleton in HTML format' do
71
- last_response.headers.fetch('Content-Type').should == 'text/html;charset=utf-8'
72
- end
71
+ it 'returns adyen skeleton in HTML format' do
72
+ last_response.headers.fetch('Content-Type').should == 'text/html;charset=utf-8'
73
+ end
73
74
 
74
- it 'returns skins_directory' do
75
- last_response.body.should include(skins_directory)
76
- end
75
+ it 'returns skins_directory' do
76
+ last_response.body.should include(skins_directory)
77
+ end
77
78
 
78
- it 'returns avilable skins' do
79
- last_response.body.should include(skin_code)
80
- end
79
+ it 'returns avilable skins' do
80
+ last_response.body.should include(skin_code)
81
81
  end
82
+ end
82
83
 
83
- describe "skin" do
84
- let(:path) { skin_code }
84
+ describe "/:skin_code" do
85
+ let(:path) { "/#{skin_code}" }
85
86
 
86
- it 'responds with 200 status' do
87
- last_response.status.should == 200
88
- end
87
+ before(:each) do
88
+ get path
89
+ end
90
+
91
+ it 'responds with 200 status' do
92
+ last_response.status.should == 200
93
+ end
89
94
 
90
- it 'returns adyen skeleton in HTML format' do
91
- last_response.headers.fetch('Content-Type').should == 'text/html;charset=utf-8'
92
- end
95
+ it 'returns adyen skeleton in HTML format' do
96
+ last_response.headers.fetch('Content-Type').should == 'text/html;charset=utf-8'
97
+ end
93
98
 
94
- it 'returns adyen form' do
95
- last_response.body.should include('<form id="pageform" action="" method="post" onsubmit="return formValidate(this);">')
96
- end
99
+ it 'returns adyen form' do
100
+ last_response.body.should include('<form id="pageform" action="" method="post" onsubmit="return formValidate(this);">')
101
+ end
97
102
 
98
- it 'returns order data' do
99
- last_response.body.should include(File.read(skins_directory + skin_code + '/inc/order_data.txt'))
100
- end
103
+ it 'returns order data' do
104
+ last_response.body.should include(File.read(File.join(skins_directory, skin_code, 'inc/order_data.txt')))
101
105
  end
102
106
  end
103
107
 
104
- context "one file skin" do
105
- describe "compile" do
106
- let(:skin_code) { "/JH0815" }
107
- let(:path) { skin_code + "?compile=true" }
108
+ describe "/compile" do
109
+ let(:skin_code) { "JH0815" }
110
+ let(:path) { "/#{skin_code}/compile" }
111
+ let(:skin_dir) { File.join(skins_directory, skin_code) }
108
112
 
109
- before(:each) do
110
- get path
111
- end
113
+ before do
114
+ get path
115
+ end
112
116
 
113
- after do
114
- FileUtils.rm_rf(skins_directory + skin_code + '/inc')
115
- `rm JH0815.zip`
116
- end
117
+ after do
118
+ FileUtils.rm_rf( skin_dir + '/inc')
119
+ `rm #{skin_code}.zip`
120
+ end
117
121
 
118
- it 'writes cheader' do
119
- File.read(skins_directory + skin_code + '/inc/cheader.txt').should == "<!-- ### inc/cheader_[locale].txt or inc/cheader.txt (fallback) ### -->"
120
- end
122
+ it 'writes cheader' do
123
+ File.read( skin_dir + '/inc/cheader.txt').should == "<!-- ### inc/cheader_[locale].txt or inc/cheader.txt (fallback) ### -->"
124
+ end
121
125
 
122
- it 'writes pmheader' do
123
- File.read(skins_directory + skin_code + '/inc/pmheader.txt').should == "<!-- ### inc/pmheader_[locale].txt or inc/pmheader.txt (fallback) ### -->"
124
- end
126
+ it 'writes pmheader' do
127
+ File.read( skin_dir + '/inc/pmheader.txt').should == "<!-- ### inc/pmheader_[locale].txt or inc/pmheader.txt (fallback) ### -->"
128
+ end
125
129
 
126
- it 'writes pmfooter' do
127
- File.read(skins_directory + skin_code + '/inc/pmfooter.txt').should == "<!-- ### inc/pmfooter_[locale].txt or inc/pmfooter.txt (fallback) ### -->\n\n <!-- ### inc/customfields_[locale].txt or inc/customfields.txt (fallback) ### -->"
128
- end
130
+ it 'writes pmfooter' do
131
+ File.read( skin_dir + '/inc/pmfooter.txt').should == "<!-- ### inc/pmfooter_[locale].txt or inc/pmfooter.txt (fallback) ### -->\n\n <!-- ### inc/customfields_[locale].txt or inc/customfields.txt (fallback) ### -->"
132
+ end
129
133
 
130
- it 'writes cfooter' do
131
- File.read(skins_directory + skin_code + '/inc/cfooter.txt').should == "<!-- ### inc/cfooter_[locale].txt or inc/cfooter.txt (fallback) ### -->"
132
- end
134
+ it 'writes cfooter' do
135
+ File.read( skin_dir + '/inc/cfooter.txt').should == "<!-- ### inc/cfooter_[locale].txt or inc/cfooter.txt (fallback) ### -->"
136
+ end
133
137
 
134
- it "returns zip file" do
135
- last_response.headers["Content-Type"].should == "application/zip"
136
- end
138
+ it "returns zip file" do
139
+ last_response.headers["Content-Type"].should == "application/zip"
137
140
  end
141
+ end
138
142
 
139
- describe "upload" do
140
- let(:path) { skin_code + "?upload=true" }
141
- let!(:skin) { Adyen::Admin::Skin.new(:path => skins_directory + skin_code) }
143
+ describe "/upload" do
144
+ let(:path) { "/#{skin_code}/upload" }
145
+ let!(:skin) { Adyen::Admin::Skin.new(:path => File.join(skins_directory, skin_code)) }
146
+ let(:skin_dir) { File.join(skins_directory, skin_code) }
142
147
 
143
- after do
144
- `rm -rf #{skins_directory + skin_code}/inc/*er.txt`
145
- end
148
+ after do
149
+ `rm -rf #{skin_dir}/inc/*er.txt`
150
+ end
146
151
 
147
- it "calls upload on skin" do
148
- Adyen::Admin::Skin.should_receive(:new).and_return(skin)
149
- skin.should_receive(:upload)
150
- get path
151
- end
152
+ it "calls upload on skin" do
153
+ Adyen::Admin::Skin.should_receive(:find).and_return(skin)
154
+ skin.should_receive(:upload)
155
+ get path
152
156
  end
157
+ end
153
158
 
154
- describe "download" do
155
- let(:skin_code) { "vQW0fEo8" }
156
- let(:path) { "/?download=vQW0fEo8" }
157
- let(:skin) { Adyen::Admin::Skin.new(:code => skin_code) }
159
+ describe "/download" do
160
+ let(:skin_code) { "vQW0fEo8" }
161
+ let(:path) { "/#{skin_code}/download" }
162
+ let(:skin) { Adyen::Admin::Skin.new(:code => skin_code) }
158
163
 
159
- before do
160
- `cp spec/fixtures/example.zip spec/fixtures/#{skin_code}.zip`
161
- end
164
+ before do
165
+ `cp spec/fixtures/example.zip spec/fixtures/#{skin_code}.zip`
166
+ end
162
167
 
163
- after do
164
- `rm -rf #{skin.path}`
165
- end
168
+ after do
169
+ `rm -rf #{skin.path}`
170
+ end
166
171
 
167
- it "call download on skin" do
168
- Adyen::Admin::Skin.should_receive(:find).and_return(skin)
169
- skin.should_receive(:download).and_return("spec/fixtures/#{skin_code}.zip")
170
- get path
171
- File.should be_exists("spec/fixtures/skins/#{skin_code}/skin.html.erb")
172
- end
172
+ it "call download on skin" do
173
+ Adyen::Admin::Skin.should_receive(:find).and_return(skin)
174
+ skin.should_receive(:download).and_return("spec/fixtures/#{skin_code}.zip")
175
+ get path
176
+ File.should be_exists("spec/fixtures/skins/#{skin_code}/skin.html.erb")
177
+ end
173
178
 
174
- # it "copies skin template" do
175
- # Adyen::Admin::Skin.should_receive(:find).and_return(skin)
176
- # skin.should_receive(:download).and_return("spec/fixtures/#{skin_code}.zip")
177
- # get path
179
+ # it "copies skin template" do
180
+ # Adyen::Admin::Skin.should_receive(:find).and_return(skin)
181
+ # skin.should_receive(:download).and_return("spec/fixtures/#{skin_code}.zip")
182
+ # get path
178
183
 
179
- # end
180
- end
184
+ # end
181
185
  end
182
186
  end
183
187
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adyen-skinbuilder
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Priit Haamer
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-04-13 00:00:00 +03:00
19
+ date: 2012-04-27 00:00:00 +03:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency