glimmer-dsl-swt 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/glimmer/launcher.rb +1 -1
- data/lib/glimmer/scaffold.rb +4 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b7dbe91f4446b09448aa58ad33e7192060feb314ad3cb6e146c95f6aef034c4
|
4
|
+
data.tar.gz: 030a51954d8ed32fc128a729c7469e3c313e18615aa47caa588920dd9706c49e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3240f754fb9948de06ed1d84af8f037ca8a520aaf4d0b2d6958bf856a650ee53c13f49391e1be23566ff6f51b8792bb21e99f7bbc781c5c6c3b16b378f52193f
|
7
|
+
data.tar.gz: 6e7f3a1fb5614ece07eb98dd0f44cdefe011e69b1bb686bd8ff5c8b9968a96b692a5bace1b648c16d4aa7d66ac5e716127097fe6f08c6e744adfa307f42dfc33
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Glimmer DSL for SWT 0.1.
|
1
|
+
# Glimmer DSL for SWT 0.1.1 (Desktop GUI)
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
|
3
3
|
[![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-swt.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-swt)
|
4
4
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/glimmer/launcher.rb
CHANGED
@@ -33,7 +33,7 @@ module Glimmer
|
|
33
33
|
This runs the Glimmer application samples/hello_world.rb
|
34
34
|
MULTI_LINE_STRING
|
35
35
|
|
36
|
-
GLIMMER_LIB_LOCAL = File.expand_path(File.join(
|
36
|
+
GLIMMER_LIB_LOCAL = File.expand_path(File.join('lib', 'glimmer-dsl-swt.rb'))
|
37
37
|
GLIMMER_LIB_GEM = 'glimmer-dsl-swt'
|
38
38
|
GLIMMER_OPTIONS = %w[--log-level --quiet]
|
39
39
|
GLIMMER_OPTION_ENV_VAR_MAPPING = {
|
data/lib/glimmer/scaffold.rb
CHANGED
@@ -155,7 +155,6 @@ class Scaffold
|
|
155
155
|
end
|
156
156
|
mkdir 'bin'
|
157
157
|
write "bin/#{file_name(app_name)}", app_bin_file(app_name)
|
158
|
-
FileUtils.chmod 0755, "bin/#{file_name(app_name)}"
|
159
158
|
system "bash -c '#{RVM_FUNCTION}\n cd .\n bundle\n glimmer package\n'"
|
160
159
|
system "open packages/bundles/#{human_name(app_name).gsub(' ', '\ ')}.app"
|
161
160
|
# TODO generate rspec test suite
|
@@ -193,14 +192,14 @@ class Scaffold
|
|
193
192
|
write '.ruby-gemset', gem_name
|
194
193
|
write 'VERSION', '1.0.0'
|
195
194
|
write 'Gemfile', GEMFILE_GEM
|
196
|
-
write 'Rakefile', gem_rakefile(custom_shell_name, namespace)
|
195
|
+
write 'Rakefile', gem_rakefile(custom_shell_name, namespace, gem_name)
|
197
196
|
append "lib/#{gem_name}.rb", gem_main_file(custom_shell_name, namespace)
|
198
197
|
mkdir 'lib/views'
|
199
198
|
custom_shell(custom_shell_name, namespace, :gem)
|
200
199
|
mkdir 'bin'
|
201
200
|
write "bin/#{gem_name}", gem_bin_file(gem_name, custom_shell_name, namespace)
|
202
201
|
write "bin/#{file_name(custom_shell_name)}", gem_bin_command_file(gem_name)
|
203
|
-
FileUtils.chmod 0755, "bin/#{file_name(custom_shell_name)}"
|
202
|
+
FileUtils.chmod 0755, "bin/#{file_name(custom_shell_name)}"
|
204
203
|
if OS.mac?
|
205
204
|
mkdir_p 'package/macosx'
|
206
205
|
icon_file = "package/macosx/#{human_name(custom_shell_name)}.icns"
|
@@ -317,8 +316,6 @@ class Scaffold
|
|
317
316
|
|
318
317
|
def app_bin_file(app_name)
|
319
318
|
<<~MULTI_LINE_STRING
|
320
|
-
#!/usr/bin/env ruby
|
321
|
-
|
322
319
|
require_relative '../app/#{file_name(app_name)}'
|
323
320
|
|
324
321
|
#{class_name(app_name)}.new.open
|
@@ -327,8 +324,6 @@ class Scaffold
|
|
327
324
|
|
328
325
|
def gem_bin_file(gem_name, custom_shell_name, namespace)
|
329
326
|
<<~MULTI_LINE_STRING
|
330
|
-
#!/usr/bin/env ruby
|
331
|
-
|
332
327
|
require_relative '../lib/#{gem_name}'
|
333
328
|
|
334
329
|
include Glimmer
|
@@ -349,7 +344,7 @@ class Scaffold
|
|
349
344
|
MULTI_LINE_STRING
|
350
345
|
end
|
351
346
|
|
352
|
-
def gem_rakefile(custom_shell_name = nil, namespace = nil)
|
347
|
+
def gem_rakefile(custom_shell_name = nil, namespace = nil, gem_name = nil)
|
353
348
|
rakefile_content = File.read('Rakefile')
|
354
349
|
lines = rakefile_content.split("\n")
|
355
350
|
require_rake_line_index = lines.index(lines.detect {|l| l.include?("require 'rake'") })
|
@@ -357,7 +352,7 @@ class Scaffold
|
|
357
352
|
gem_files_line_index = lines.index(lines.detect {|l| l.include?('# dependencies defined in Gemfile') })
|
358
353
|
if custom_shell_name
|
359
354
|
lines.insert(gem_files_line_index, " gem.files = Dir['VERSION', 'LICENSE.txt', 'lib/**/*.rb', 'bin/**/*']")
|
360
|
-
lines.insert(gem_files_line_index+1, " gem.executables = ['#{file_name(custom_shell_name)}']")
|
355
|
+
lines.insert(gem_files_line_index+1, " gem.executables = ['#{gem_name}', '#{file_name(custom_shell_name)}']")
|
361
356
|
else
|
362
357
|
lines.insert(gem_files_line_index, " gem.files = Dir['lib/**/*.rb']")
|
363
358
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer-dsl-swt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AndyMaleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|