glimmer 0.9.0 → 0.9.1

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
  SHA256:
3
- metadata.gz: c109cca015308e3a388d79b30ece439200ebf53d300cb2305be5c7a3845790eb
4
- data.tar.gz: ad27543079db9eabface83fdf67342dabe37b1b01ba64e03c545bb1bea08158b
3
+ metadata.gz: 9a0e5867d64de61a6733bb4946eb3b366ae854a72bf99cdc048707c00cd9c276
4
+ data.tar.gz: b3735c7bff7ee61219f822378b59077e00f9957ed1031b09fd1e3f461eb90868
5
5
  SHA512:
6
- metadata.gz: ccdd49212a55e8ee6a91ae603314e926dfc8944c2b972e2fbf3e387b01020c6b9cdd5eeb28155f5b305f5f517e488414c01fc1f5cdec46372a34c41e467dff15
7
- data.tar.gz: c19d423a2cf484f6749072e38e1f0608395420e2a44960672a5c9620867431ebae6d12e2015f8bf398bc6d565e0a8e661f86225880d42a7fd699146c9c65c342
6
+ metadata.gz: b5e181bff40082c4620fc6ad1a306af61c7d59e24a30c13c6038606f008d9480da5532d07a704d0c39563318c23935efb909f958f596b7c49c5f2a6843ace165
7
+ data.tar.gz: 0562d569471bb792943cac85d0c3a79462573074e1ad634fb0aac1f1e9b53bbe9121d8534f9ea1ce94f5b30b0c47947618e73938e38d72695cecbfba48684210
data/README.md CHANGED
@@ -75,7 +75,7 @@ Ruby is a dynamically-typed object-oriented language, which provides great produ
75
75
 
76
76
  ## Table of contents
77
77
 
78
- - [Glimmer - Ruby Desktop Development GUI Library](#glimmer-ruby-desktop-development-gui-library)
78
+ - [Glimmer - Ruby Desktop Development GUI Library](#glimmer---ruby-desktop-development-gui-library)
79
79
  - [Examples](#examples)
80
80
  - [Hello, World!](#hello-world)
81
81
  - [Tic Tac Toe](#tic-tac-toe)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0
1
+ 0.9.1
@@ -36,3 +36,4 @@ $LOAD_PATH.unshift(File.expand_path('..', __FILE__))
36
36
  require 'glimmer/config'
37
37
  require 'glimmer/error'
38
38
  require 'glimmer/invalid_keyword_error'
39
+ require 'glimmer/dsl/engine'
@@ -56,6 +56,10 @@ module Glimmer
56
56
  dsl_stack.clear
57
57
  disabled_dsls.clear
58
58
  end
59
+
60
+ def no_dsls?
61
+ static_expressions.empty? && dynamic_expression_chains_of_responsibility.empty?
62
+ end
59
63
 
60
64
  # Dynamic expression chains of responsibility indexed by dsl
61
65
  def dynamic_expression_chains_of_responsibility
@@ -140,6 +144,10 @@ module Glimmer
140
144
 
141
145
  # Interprets Glimmer dynamic DSL expression consisting of keyword, args, and block (e.g. shell(:no_resize) { ... })
142
146
  def interpret(keyword, *args, &block)
147
+ if no_dsls?
148
+ puts "Glimmer has no DSLs configured. Add glimmer-dsl-swt gem or visit https://github.com/AndyObtiva/glimmer#multi-dsl-support for more details.\n"
149
+ return
150
+ end
143
151
  keyword = keyword.to_s
144
152
  dynamic_expression_dsl = (dynamic_expression_chains_of_responsibility.keys - disabled_dsls).first if dsl.nil?
145
153
  dsl_stack.push(dynamic_expression_dsl || dsl)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh