lunfardo 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2eedc2a9d1490bcc9b8b796fba86a8d1de87e748
4
- data.tar.gz: a9dd417aaff5a9342f1f27d091c431ae18fa275f
3
+ metadata.gz: 19d57fcb9a0317c6d825563cb21130211958aa1f
4
+ data.tar.gz: 1b3e61387dad26c0a72e5fdf6b9198ad32e7cac2
5
5
  SHA512:
6
- metadata.gz: 5e28a670b94f828be87bbef17877df4e7f721f67ec81996120748b1e7857dbe0d8eb014ed2a5b12c941f547ae7f3dddcf46be577465abb380f7504836bc14c03
7
- data.tar.gz: 7405789a3ded3bb148b97b268ed7ec60c582bda9fc00b6bdcbed8325035eb9d8de62e303dcf88fb53d3b3f0e89e210eabb1b6be472273cfbedb471730a58f30b
6
+ metadata.gz: 2a17eda51361b7c54c73a329fde4d0bcfb809d624ca7cab49102b0bbd353b5205390c31c879a9e45db6ca60e20e3344fbe6810605e9c0126588421369475d089
7
+ data.tar.gz: 6398e786cbd43af643a1f918a3a45ffe5350fdb58f9d600e6cab42d0a6c7078daf23a6d1902213bcc44dd8e6155c9360ba0c40db853b482646bf71bc81cf0bb0
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+
3
+ rvm:
4
+ - "2.2"
5
+
6
+ before_install: gem install bundler
7
+
8
+ script: bundle exec rspec
9
+
10
+ git:
11
+ submodules: false
data/Gemfile CHANGED
@@ -4,4 +4,5 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  gem 'rspec', require: false
7
- gem 'simplecov', require: false
7
+ gem 'simplecov', require: false
8
+ gem 'coveralls', require: false
data/README.md CHANGED
@@ -3,6 +3,12 @@
3
3
  Lunfardo is a framework to easily define simple (and not quite so simple) DSLs.
4
4
  For example it can be used to define an object configuration DSL.
5
5
 
6
+ ## Status
7
+
8
+ [![Gem Version](https://badge.fury.io/rb/lunfardo.svg)](https://badge.fury.io/rb/lunfardo)
9
+ [![Build Status](https://travis-ci.org/cabeza-de-termo/lunfardo.svg?branch=master)](https://travis-ci.org/cabeza-de-termo/lunfardo)
10
+ [![Coverage Status](https://coveralls.io/repos/github/cabeza-de-termo/lunfardo/badge.svg?branch=master)](https://coveralls.io/github/cabeza-de-termo/lunfardo?branch=master)
11
+
6
12
  ## Installation
7
13
 
8
14
  Add this line to your application's Gemfile:
@@ -232,15 +238,15 @@ class BloatedJoinDSL
232
238
  on :filenames do
233
239
  attr_reader :files
234
240
 
235
- define :extension do
236
- '.txt'.freeze
237
- end
238
-
239
241
  before do
240
242
  @files = []
241
243
  end
242
244
 
243
245
  on :filename do |name|
246
+ define :extension do
247
+ '.txt'.freeze
248
+ end
249
+
244
250
  perform do |name|
245
251
  outer.files << name + extension
246
252
  end
@@ -39,7 +39,7 @@ module CabezaDeTermo
39
39
  define_method(method_name, &block)
40
40
  end
41
41
 
42
- def before(&block)
42
+ def before(*params, &block)
43
43
  define(:before, &block)
44
44
  end
45
45
 
@@ -47,15 +47,13 @@ module CabezaDeTermo
47
47
  define(:perform, &block)
48
48
  end
49
49
 
50
- def on(method_name, block_param: false, &block)
50
+ def on(method_name, &block)
51
51
  scopes[method_name] = Scope.new_scope_class(name: method_name, &block)
52
52
 
53
53
  scopes[method_name].instance_exec(&block)
54
54
  end
55
55
 
56
- def after(&block)
57
- raise_error("#after method must receive a block argument") if block.nil?
58
-
56
+ def after(*params, &block)
59
57
  define(:after, &block)
60
58
  end
61
59
 
@@ -109,7 +107,7 @@ module CabezaDeTermo
109
107
 
110
108
  def outer(n = 1)
111
109
  (1..n-1).inject(@outer_scope) do |outer_scope, i|
112
- outer.outer
110
+ outer_scope.outer
113
111
  end
114
112
  end
115
113
 
@@ -1,5 +1,5 @@
1
1
  module CabezaDeTermo
2
2
  module Lunfardo
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lunfardo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Rubi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-16 00:00:00.000000000 Z
11
+ date: 2016-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -47,6 +47,7 @@ extra_rdoc_files: []
47
47
  files:
48
48
  - ".gitignore"
49
49
  - ".rspec"
50
+ - ".travis.yml"
50
51
  - Gemfile
51
52
  - LICENSE.txt
52
53
  - README.md
@@ -77,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
78
  version: '0'
78
79
  requirements: []
79
80
  rubyforge_project:
80
- rubygems_version: 2.6.3
81
+ rubygems_version: 2.4.6
81
82
  signing_key:
82
83
  specification_version: 4
83
84
  summary: A framework to easily define simple DSLs