flok 0.0.28 → 0.0.29
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.
- checksums.yaml +4 -4
- data/lib/flok/version.rb +1 -1
- data/spec/etc/cli_spec.rb +10 -28
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 814b9ab5667695a4b37509a02cb109d34b492017
|
4
|
+
data.tar.gz: 8e1abadd518096d523acd3ed37adc0b22e1b87e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50d39d48772d80a9fa82df7d687eeaa2a17270be8398777345ae9e1a2d1c9afc3f594044c9ab6de9c43db3de7c73b5481ab5f73df7fbdcb5e3fca9856d493962
|
7
|
+
data.tar.gz: 959c40b892fddfc36f7b0633b8498eb04a1427493bd6da5fa8a1db937a2258f6d1f262a95428746a318d208dd0d400c2a2f8aa9f053a86be408f6fa1d7d5b3e5
|
data/lib/flok/version.rb
CHANGED
data/spec/etc/cli_spec.rb
CHANGED
@@ -35,12 +35,12 @@ def flok_new
|
|
35
35
|
end
|
36
36
|
|
37
37
|
RSpec.describe "CLI" do
|
38
|
-
|
38
|
+
before(:all) do
|
39
39
|
#Uninstall old gems and install the current development gem
|
40
40
|
system("rake gem:install")
|
41
41
|
end
|
42
42
|
|
43
|
-
|
43
|
+
it "Can be executed via bundle exec" do
|
44
44
|
Flok.platforms.each do |platform|
|
45
45
|
ENV['PLATFORM'] = platform
|
46
46
|
flok_new do
|
@@ -71,7 +71,7 @@ it "Can create a new project with correct directories" do
|
|
71
71
|
ENV['PLATFORM'] = platform
|
72
72
|
flok_new do
|
73
73
|
#Build a new project
|
74
|
-
flok "build
|
74
|
+
flok "build"
|
75
75
|
|
76
76
|
#Check it's products directory
|
77
77
|
expect(dirs).to include "products"
|
@@ -106,7 +106,7 @@ it "Can create a new project with correct directories" do
|
|
106
106
|
File.write "./app/controllers/controller0.rb", controller_src if path
|
107
107
|
|
108
108
|
#Build a new project
|
109
|
-
flok "build
|
109
|
+
flok "build"
|
110
110
|
|
111
111
|
#Check it's products directory
|
112
112
|
Dir.chdir "products" do
|
@@ -135,16 +135,11 @@ it "Can create a new project with correct directories" do
|
|
135
135
|
end
|
136
136
|
end
|
137
137
|
|
138
|
-
|
138
|
+
include SpecHelpers
|
139
139
|
it "server does build project when first run" do
|
140
140
|
Flok.platforms.each do |platform|
|
141
141
|
ENV['PLATFORM'] = platform
|
142
142
|
flok_new do
|
143
|
-
#Start the server
|
144
|
-
#Get path to the flok binary relative to this file
|
145
|
-
bin_path = File.join(File.dirname(__FILE__), "../../bin/flok")
|
146
|
-
lib_path = File.join(File.dirname(__FILE__), "../../lib")
|
147
|
-
|
148
143
|
#Now execute the command with a set of arguments
|
149
144
|
sh2("bundle exec flok server", /BUILD RAN/) do |inp, out|
|
150
145
|
#The server should always trigger a build on it's first run
|
@@ -176,11 +171,6 @@ it "Can create a new project with correct directories" do
|
|
176
171
|
Flok.platforms.each do |platform|
|
177
172
|
ENV['PLATFORM'] = platform
|
178
173
|
flok_new do
|
179
|
-
#Start the server
|
180
|
-
#Get path to the flok binary relative to this file
|
181
|
-
bin_path = File.join(File.dirname(__FILE__), "../../bin/flok")
|
182
|
-
lib_path = File.join(File.dirname(__FILE__), "../../lib")
|
183
|
-
|
184
174
|
#Now execute the command with a set of arguments
|
185
175
|
sh2("bundle exec flok server", /BUILD RAN/) do |inp, out|
|
186
176
|
#Get the original build
|
@@ -215,17 +205,14 @@ it "Can create a new project with correct directories" do
|
|
215
205
|
Flok.platforms.each do |platform|
|
216
206
|
ENV['PLATFORM'] = platform
|
217
207
|
flok_new do
|
218
|
-
#Start the server
|
219
|
-
#Get path to the flok binary relative to this file
|
220
|
-
bin_path = File.join(File.dirname(__FILE__), "../../bin/flok")
|
221
|
-
lib_path = File.join(File.dirname(__FILE__), "../../lib")
|
222
|
-
|
223
208
|
#Now execute the command with a set of arguments
|
224
209
|
sh2("bundle exec flok server", /BUILD RAN/) do |inp, out|
|
225
210
|
real_application_user_js = File.read("products/#{platform}/application_user.js")
|
226
211
|
|
227
212
|
#Grab the application_user.js file
|
228
213
|
res = wget "http://localhost:9992/application_user.js"
|
214
|
+
expect(res).not_to eq(nil)
|
215
|
+
expect(res.length).not_to eq(0)
|
229
216
|
expect(res).to eq(real_application_user_js)
|
230
217
|
end
|
231
218
|
end
|
@@ -236,11 +223,6 @@ it "Can create a new project with correct directories" do
|
|
236
223
|
Flok.platforms.each do |platform|
|
237
224
|
ENV['PLATFORM'] = platform
|
238
225
|
flok_new do
|
239
|
-
#Start the server
|
240
|
-
#Get path to the flok binary relative to this file
|
241
|
-
bin_path = File.join(File.dirname(__FILE__), "../../bin/flok")
|
242
|
-
lib_path = File.join(File.dirname(__FILE__), "../../lib")
|
243
|
-
|
244
226
|
#Now execute the command with a set of arguments
|
245
227
|
sh2("bundle exec flok server", /BUILD RAN/) do |inp, out|
|
246
228
|
#Get the original
|
@@ -262,9 +244,9 @@ it "Can create a new project with correct directories" do
|
|
262
244
|
#Grab new version
|
263
245
|
application_user_js2 = wget "http://localhost:9992/application_user.js"
|
264
246
|
|
265
|
-
#Make sure the compiled file is different and it's
|
266
|
-
expect(application_user_js2).
|
267
|
-
expect(application_user_js2.length).to be > 30 #
|
247
|
+
#Make sure the compiled file is different and it's longer
|
248
|
+
expect(application_user_js2.length).to be > application_user_js.length
|
249
|
+
expect(application_user_js2.length).to be > 30 #Make sure it's at least something
|
268
250
|
end
|
269
251
|
end
|
270
252
|
end
|