glimmer 1.0.0 → 1.0.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: 7b0649c15df47ea25dfacee159d334e1ba296468477d9e46229fbb99d73725e4
4
- data.tar.gz: 52b2d756a2d8c24cc2fa1f6072a4084d87d8c08198183159ef31ddb5b105634d
3
+ metadata.gz: e658a13d552f17f352fa3a932ded6dbcaaef5e423fda5f02d7fa0a6b93d1152a
4
+ data.tar.gz: bd5291701f81271b2f3c005c4e1a0216cc90d7bcdb3a386afc751430e57f425e
5
5
  SHA512:
6
- metadata.gz: 697d512b1ed187adf8a385fbaf6b7b5f21ae9a96a2896f08e3a718839adc0af0c6fac93aa2fb2ecc5f6c84e898b6e3ce1caf264e2b095d6de71a1a3ed96699c3
7
- data.tar.gz: b9a8fb00ada502c70b4b9d6401596807ad2a881b6926b9150c6f29ca7f687e1eee824f88ee1fb99dae845e338d2a92fdde0c388ec8366a83e724efe6a4d20b45
6
+ metadata.gz: ac46e59a6f2e75ad89df1725bb7ebd5b740512544969e016cef62670d214a14d1dc6d1873c7e9a268f726ad0b21214c4760a8001111afae9c2a8d3db088f12ec
7
+ data.tar.gz: 3cc604177fd6101d53a9aa6a26c36f9eda889d81c5fc16f432289c50961e99bd7bf4401563b3fd27317796c3baaffd91f2b00f801a8002b555b26e5c4dbddb45
@@ -3,6 +3,10 @@
3
3
  Related Change Logs:
4
4
  - [glimmer-dsl-swt/CHANGELOG.md](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/CHANGELOG.md)
5
5
 
6
+ ## 1.0.1
7
+
8
+ - Fixed issue with excluded keywords getting caught up by the infinite-loop-detection check
9
+
6
10
  ## 1.0.0
7
11
 
8
12
  - Code/Documentation preparation for version 1.0.0
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 style="position: relative; top: 20px;" />](https://rubygems.org/gems/glimmer) Glimmer 1.0.0
1
+ # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 style="position: relative; top: 20px;" />](https://rubygems.org/gems/glimmer) Glimmer 1.0.1 - DSL Framework
2
2
  [![Gem Version](https://badge.fury.io/rb/glimmer.svg)](http://badge.fury.io/rb/glimmer)
3
3
  [![Travis CI](https://travis-ci.com/AndyObtiva/glimmer.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer)
4
4
  [![Coverage Status](https://coveralls.io/repos/github/AndyObtiva/glimmer/badge.svg?branch=master)](https://coveralls.io/github/AndyObtiva/glimmer?branch=master)
@@ -9,7 +9,13 @@
9
9
 
10
10
  (The Original Glimmer Library Since 2007. Beware of Imitators!)
11
11
 
12
- [**Glimmer**](https://rubygems.org/gems/glimmer) is a Ruby DSL engine with support for the following DSLs:
12
+ [**Glimmer**](https://rubygems.org/gems/glimmer) started out as [GUI Library](https://github.com/AndyObtiva/glimmer-dsl-swt) and grew into a full-fledged [DSL Framework](#multi-dsl-support). Glimmer's namesake is referring to the Glimmer of Ruby in Graphical User Interfaces (contrary to popular myth perpetrated by [Charles Nutter](http://blog.headius.com/2007/11/tab-sweep.html), Glimmer has nothing to do with the ill-fated Whitney Houston movie, which does not in fact share the same name)
13
+
14
+ [**Glimmer**](https://rubygems.org/gems/glimmer) is a DSL Framework that consists of:
15
+ - DSL Engine: enables building DSLs for desktop GUI, XML/HTML documents, CSS styling, and webification of desktop apps.
16
+ - Data-Binding/Observer/Observable Library: enables synchronizing GUI with Model Attributes bidirectionally.
17
+
18
+ [**Glimmer**](https://rubygems.org/gems/glimmer) supports the following DSLs:
13
19
  - [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (JRuby Desktop Development GUI Library)
14
20
  - [glimmer-dsl-tk](https://github.com/AndyObtiva/glimmer-dsl-tk): Glimmer DSL for Tk (Ruby Desktop Development GUI Library)
15
21
  - [glimmer-dsl-opal](https://github.com/AndyObtiva/glimmer-dsl-opal): Glimmer DSL for Opal (Web GUI Adapter for Desktop Apps)
@@ -23,7 +29,7 @@ Featured in<br />JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.d
23
29
 
24
30
  ## Table of contents
25
31
 
26
- - [Glimmer 1.0.0](#-glimmer-100)
32
+ - [Glimmer 1.0.1](#-glimmer-101)
27
33
  - [Glimmer DSL for SWT (JRuby Desktop Development GUI Library)](#glimmer-dsl-for-swt-jruby-desktop-development-gui-library)
28
34
  - [Glimmer DSL for SWT Samples](#glimmer-dsl-for-swt-samples)
29
35
  - [Hello, World!](#hello-world)
@@ -270,7 +276,7 @@ Glimmer App:
270
276
 
271
277
  ## Glimmer DSL for Tk (Ruby Desktop Development GUI Library)
272
278
 
273
- [Tcl/Tk](https://www.tcl.tk/) has evolved into a practical desktop GUI toolkit due to gaining true native widgets on Mac, Windows, and Linux in [Tk version 8.5](https://www.tcl.tk/software/tcltk/8.5.html#:~:text=Highlights%20of%20Tk%208.5&text=Font%20rendering%3A%20Now%20uses%20anti,and%20window%20layout%2C%20and%20more.).
279
+ [Tcl/Tk](https://www.tcl.tk/) has evolved into a practical desktop GUI toolkit due to gaining truely native looking widgets on Mac, Windows, and Linux in [Tk version 8.5](https://www.tcl.tk/software/tcltk/8.5.html#:~:text=Highlights%20of%20Tk%208.5&text=Font%20rendering%3A%20Now%20uses%20anti,and%20window%20layout%2C%20and%20more.).
274
280
 
275
281
  Additionally, [Ruby](https://www.ruby-lang.org/en/) 3.0 Ractor (formerly known as [Guilds](https://olivierlacan.com/posts/concurrency-in-ruby-3-with-guilds/)) supports truly parallel multi-threading, making both [MRI](https://github.com/ruby/ruby) and [Tk](https://www.tcl.tk/) finally viable for support in [Glimmer](https://github.com/AndyObtiva/glimmer) (Ruby Desktop Development GUI Library) as an alternative to [JRuby on SWT](https://github.com/AndyObtiva/glimmer-dsl-swt).
276
282
 
@@ -726,6 +732,8 @@ body{font-size:1.1em;background:white}body > h1{background-color:red;font-size:2
726
732
 
727
733
  ## Multi-DSL Support
728
734
 
735
+ Glimmer official DSL gems always start with `glimmer-dsl-`. That said, other libraries may use the Glimmer DSL engine too not for building GUI apps (e.g. `bundler-download`)
736
+
729
737
  Glimmer allows mixing DSLs, which comes in handy when doing things like using a desktop Browser widget with HTML and CSS.
730
738
 
731
739
  Glimmer DSL syntax consists mainly of:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -0,0 +1,81 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+ # stub: glimmer 1.0.1 ruby lib
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "glimmer".freeze
9
+ s.version = "1.0.1"
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib".freeze]
13
+ s.authors = ["AndyMaleh".freeze]
14
+ s.date = "2020-10-04"
15
+ s.description = "Glimmer is a Ruby DSL engine with support for the Glimmer DSL for SWT (JRuby Desktop Development GUI Library), the Glimmer DSL for Tk (Ruby Desktop Development GUI Library), the Glimmer DSL for Opal (Web GUI Adapter for Desktop Apps), the Glimmer DSL for XML (& HTML), and the Glimmer DSL for CSS.".freeze
16
+ s.email = "andy.am@gmail.com".freeze
17
+ s.extra_rdoc_files = [
18
+ "CHANGELOG.md",
19
+ "LICENSE.txt",
20
+ "README.md"
21
+ ]
22
+ s.files = [
23
+ "CHANGELOG.md",
24
+ "CONTRIBUTING.md",
25
+ "LICENSE.txt",
26
+ "PROCESS.md",
27
+ "README.md",
28
+ "VERSION",
29
+ "glimmer.gemspec",
30
+ "lib/glimmer.rb",
31
+ "lib/glimmer/config.rb",
32
+ "lib/glimmer/data_binding/model_binding.rb",
33
+ "lib/glimmer/data_binding/observable.rb",
34
+ "lib/glimmer/data_binding/observable_array.rb",
35
+ "lib/glimmer/data_binding/observable_model.rb",
36
+ "lib/glimmer/data_binding/observer.rb",
37
+ "lib/glimmer/dsl/engine.rb",
38
+ "lib/glimmer/dsl/expression.rb",
39
+ "lib/glimmer/dsl/expression_handler.rb",
40
+ "lib/glimmer/dsl/parent_expression.rb",
41
+ "lib/glimmer/dsl/static_expression.rb",
42
+ "lib/glimmer/dsl/top_level_expression.rb",
43
+ "lib/glimmer/error.rb",
44
+ "lib/glimmer/invalid_keyword_error.rb"
45
+ ]
46
+ s.homepage = "http://github.com/AndyObtiva/glimmer".freeze
47
+ s.licenses = ["MIT".freeze]
48
+ s.rubygems_version = "3.1.4".freeze
49
+ s.summary = "Glimmer Ruby DSL Engine".freeze
50
+
51
+ if s.respond_to? :specification_version then
52
+ s.specification_version = 4
53
+ end
54
+
55
+ if s.respond_to? :add_runtime_dependency then
56
+ s.add_runtime_dependency(%q<array_include_methods>.freeze, [">= 1.0.3", "< 2.0.0"])
57
+ s.add_runtime_dependency(%q<facets>.freeze, [">= 3.1.0", "< 4.0.0"])
58
+ s.add_development_dependency(%q<rspec-mocks>.freeze, ["~> 3.5.0"])
59
+ s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
60
+ s.add_development_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.0"])
61
+ s.add_development_dependency(%q<rake>.freeze, [">= 10.1.0", "< 14.0.0"])
62
+ s.add_development_dependency(%q<jeweler>.freeze, [">= 2.0.0", "< 3.0.0"])
63
+ s.add_development_dependency(%q<rdoc>.freeze, [">= 6.2.1", "< 7.0.0"])
64
+ s.add_development_dependency(%q<coveralls>.freeze, ["= 0.8.23"])
65
+ s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.16.1"])
66
+ s.add_development_dependency(%q<simplecov-lcov>.freeze, ["~> 0.7.0"])
67
+ else
68
+ s.add_dependency(%q<array_include_methods>.freeze, [">= 1.0.3", "< 2.0.0"])
69
+ s.add_dependency(%q<facets>.freeze, [">= 3.1.0", "< 4.0.0"])
70
+ s.add_dependency(%q<rspec-mocks>.freeze, ["~> 3.5.0"])
71
+ s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
72
+ s.add_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.0"])
73
+ s.add_dependency(%q<rake>.freeze, [">= 10.1.0", "< 14.0.0"])
74
+ s.add_dependency(%q<jeweler>.freeze, [">= 2.0.0", "< 3.0.0"])
75
+ s.add_dependency(%q<rdoc>.freeze, [">= 6.2.1", "< 7.0.0"])
76
+ s.add_dependency(%q<coveralls>.freeze, ["= 0.8.23"])
77
+ s.add_dependency(%q<simplecov>.freeze, ["~> 0.16.1"])
78
+ s.add_dependency(%q<simplecov-lcov>.freeze, ["~> 0.7.0"])
79
+ end
80
+ end
81
+
@@ -55,22 +55,23 @@ module Glimmer
55
55
  end
56
56
 
57
57
  def method_missing(method_symbol, *args, &block)
58
- new_loop_data = [method_symbol, args, block]
59
- if new_loop_data == Glimmer.loop_last_data
60
- Glimmer.loop_increment!
61
- raise "Glimmer looped #{Config.loop_max_count} times with keyword '#{new_loop_data[0]}'! Check code for errors." if Glimmer.loop == Config.loop_max_count
62
- else
63
- Glimmer.loop_reset!
64
- end
65
- Glimmer.loop_last_data = new_loop_data
66
58
  # This if statement speeds up Glimmer in girb or whenever directly including on main object
67
59
  is_excluded = Config.excluded_keyword_checkers.reduce(false) {|result, checker| result || instance_exec(method_symbol, *args, &checker) }
68
60
  if is_excluded
69
61
  Glimmer::Config.logger.debug "Glimmer excluded keyword: #{method_symbol}" if Glimmer::Config.log_excluded_keywords?
70
62
  super(method_symbol, *args, &block)
63
+ else
64
+ new_loop_data = [method_symbol, args, block]
65
+ if new_loop_data == Glimmer.loop_last_data
66
+ Glimmer.loop_increment!
67
+ raise "Glimmer looped #{Config.loop_max_count} times with keyword '#{new_loop_data[0]}'! Check code for errors." if Glimmer.loop == Config.loop_max_count
68
+ else
69
+ Glimmer.loop_reset!
70
+ end
71
+ Glimmer.loop_last_data = new_loop_data
72
+ Glimmer::Config.logger.info {"Interpreting keyword: #{method_symbol}"}
73
+ Glimmer::DSL::Engine.interpret(method_symbol, *args, &block)
71
74
  end
72
- Glimmer::Config.logger.info {"Interpreting keyword: #{method_symbol}"}
73
- Glimmer::DSL::Engine.interpret(method_symbol, *args, &block)
74
75
  rescue InvalidKeywordError => e
75
76
  Glimmer::Config.logger.error {"Encountered an invalid keyword at this object: #{self}"}
76
77
  Glimmer::Config.logger.error {e.full_message}
@@ -23,7 +23,7 @@ module Glimmer
23
23
  module Config
24
24
  class << self
25
25
  LOOP_MAX_COUNT_DEFAULT = 100
26
- REGEX_METHODS_EXCLUDED = /^(to_|\[)/
26
+ REGEX_METHODS_EXCLUDED = /^(to_|\[|load_iseq)/
27
27
 
28
28
  attr_writer :loop_max_count
29
29
  attr_accessor :log_excluded_keywords
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.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-09-18 00:00:00.000000000 Z
11
+ date: 2020-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: array_include_methods
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.2
19
+ version: 1.0.3
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.0.0
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 1.0.2
29
+ version: 1.0.3
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.0.0
@@ -118,7 +118,7 @@ dependencies:
118
118
  requirements:
119
119
  - - ">="
120
120
  - !ruby/object:Gem::Version
121
- version: 2.3.9
121
+ version: 2.0.0
122
122
  - - "<"
123
123
  - !ruby/object:Gem::Version
124
124
  version: 3.0.0
@@ -128,7 +128,7 @@ dependencies:
128
128
  requirements:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: 2.3.9
131
+ version: 2.0.0
132
132
  - - "<"
133
133
  - !ruby/object:Gem::Version
134
134
  version: 3.0.0
@@ -212,6 +212,7 @@ files:
212
212
  - PROCESS.md
213
213
  - README.md
214
214
  - VERSION
215
+ - glimmer.gemspec
215
216
  - lib/glimmer.rb
216
217
  - lib/glimmer/config.rb
217
218
  - lib/glimmer/data_binding/model_binding.rb
@@ -246,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
246
247
  - !ruby/object:Gem::Version
247
248
  version: '0'
248
249
  requirements: []
249
- rubygems_version: 3.1.2
250
+ rubygems_version: 3.1.4
250
251
  signing_key:
251
252
  specification_version: 4
252
253
  summary: Glimmer Ruby DSL Engine