rufus-lua-moon 0.4.0 → 0.4.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
  SHA1:
3
- metadata.gz: 59faaa1677c7e57480d6a18470b0dec01f916d9c
4
- data.tar.gz: 15ccf6ad23a02d98574f68aa0a2139a912d59669
3
+ metadata.gz: e03b60b3d4e8f15c1430ddc04511a798237122e1
4
+ data.tar.gz: 91a9e8867e4e0a0192fcd1d7f95280b0eba7a98c
5
5
  SHA512:
6
- metadata.gz: 4d7f498e85e7a08aebf7b14f5c60862e13b2894674219f694ef60a3d8d018ab55603c72624f82e3b01505c7471dfde19859a8049c67794d49752c143bbd9a7bd
7
- data.tar.gz: 27128fdaffadc31ba248b4574d1fef272daf25c1019fd66c031f39ba737f55f4cc03928d3b15cc8b1d3b62b654b3bbfc1042ae0f0bbea47f896c57858c32821f
6
+ metadata.gz: 376f3ed3a64793fbbc50e7e2dcb8325d065c689fd77f83458f7e9cc1c5dff9ce235dd5fce59aa30d67c56501217fbdb3ca7674a5585cb00a57ece5b4b047fccc
7
+ data.tar.gz: d2ec62bd2ecfb00d44cf11daa7cc1a0d3c1cdd621c7950c1abf1c99f7bd3fd313b08ccef4a4cb5db6444c94862fd81536298c69ea92295e2ecd012e120050232
@@ -1,18 +1,14 @@
1
- require "rufus/lua/moon/version"
1
+ require "rufus/lua"
2
+ require_relative "moon/version"
2
3
 
3
- module Rufus
4
- module Lua
5
- module Moon
6
-
7
- end
8
- class State
9
- def moon!
10
- self['package']['path']=
11
- (['', '/init'].map{|x|File.expand_path "?#{x}.lua", Moon::Path}<<
12
- self['package']['path'])*';'
13
- eval 'require "moonscript"'
14
- self
15
- end
4
+ module Rufus::Lua
5
+ class State
6
+ def moon!
7
+ self['package']['path']=
8
+ (['', '/init'].map{|x|File.expand_path "?#{x}.lua", Moon::Path}<<
9
+ self['package']['path'])*';'
10
+ eval 'require "moonscript"'
11
+ self
16
12
  end
17
13
  end
18
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rufus-lua-moon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stas Ukolov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-03 00:00:00.000000000 Z
11
+ date: 2016-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: appveyor-worker
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rufus-lua
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -87,23 +101,8 @@ executables: []
87
101
  extensions: []
88
102
  extra_rdoc_files: []
89
103
  files:
90
- - ".gitignore"
91
- - ".gitmodules"
92
- - ".travis.yml"
93
- - FarMenu.ini
94
- - Gemfile
95
- - LICENSE.txt
96
- - README.md
97
- - Rakefile
98
104
  - lib/rufus/lua/moon.rb
99
105
  - lib/rufus/lua/moon/version.rb
100
- - rufus-lua-moon.gemspec
101
- - test/chain.rb
102
- - test/compile.rb
103
- - test/path.rb
104
- - test/path27.moon
105
- - test/req.rb
106
- - test/ver.rb
107
106
  - vendor/leafo/moon/all.moon
108
107
  - vendor/leafo/moon/init.moon
109
108
  - vendor/leafo/moonscript/base.lua
@@ -159,10 +158,4 @@ rubygems_version: 2.2.3
159
158
  signing_key:
160
159
  specification_version: 4
161
160
  summary: ''
162
- test_files:
163
- - test/chain.rb
164
- - test/compile.rb
165
- - test/path.rb
166
- - test/path27.moon
167
- - test/req.rb
168
- - test/ver.rb
161
+ test_files: []
data/.gitignore DELETED
@@ -1,18 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- .subversion
data/.gitmodules DELETED
@@ -1,3 +0,0 @@
1
- [submodule "vendor/leafo"]
2
- path = vendor/leafo
3
- url = https://github.com/leafo/moonscript.git
data/.travis.yml DELETED
@@ -1,10 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2
4
- - 2.1
5
- - 2.0.0
6
- - 1.9.3
7
- - 1.9.2
8
- before_install:
9
- - sudo apt-get update -qq
10
- - sudo apt-get install -y liblua5.1-0-dev liblua5.1-lpeg2
data/FarMenu.ini DELETED
@@ -1,16 +0,0 @@
1
- I: Install dependencies
2
- bundle install
3
- --:
4
- B: Build gem
5
- bundle exec rake build
6
- L: Install gem locally
7
- bundle exec rake install
8
- U: Uninstall gem
9
- gem uninstall -a rufus-lua-moon
10
- P: Publish gem
11
- bundle exec rake release
12
- --:
13
- T: Run tests
14
- bundle exec rake
15
- C: Open console
16
- bundle console -new_console:c
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in rufus-lua-moon.gemspec
4
- gemspec
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2014 Stas Ukolov
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md DELETED
@@ -1,57 +0,0 @@
1
- # Rufus::Lua::Moon
2
-
3
- [![Build Status](https://travis-ci.org/ukoloff/rufus-lua-moon.svg?branch=master)](https://travis-ci.org/ukoloff/rufus-lua-moon)
4
- [![Gem Version](https://badge.fury.io/rb/rufus-lua-moon.svg)](http://badge.fury.io/rb/rufus-lua-moon)
5
-
6
- Provides MoonScript for Rufus::Lua interpreter
7
-
8
- ## Installation
9
-
10
- Add this line to your application's Gemfile:
11
-
12
- gem 'rufus-lua-moon'
13
-
14
- And then execute:
15
-
16
- $ bundle
17
-
18
- Or install it yourself as:
19
-
20
- $ gem install rufus-lua-moon
21
-
22
- ## Usage
23
-
24
- After creating Rufus::Lua interpreter patch it to support MoonScript:
25
-
26
- ```ruby
27
- s=Rufus::Lua::State.new
28
- s.moon!
29
- s.eval <<EOL
30
- m=require "moonscript.base"
31
- x=m.to_lua "->1"
32
- print(x)
33
- EOL
34
- ```
35
- You can set `package.moonpath` and require file(s) with moonscript code:
36
- ```ruby
37
- s=Rufus::Lua::State.new.moon!
38
- s.eval <<EOL
39
- package.moonpath='./?.moon'
40
- require 'myfile' -- load 'myfile.moon'
41
- EOL
42
- ```
43
-
44
- ## Dependencies
45
-
46
- On Linux you should have Lua and Lpeg installed
47
- (eg. for [Ubuntu](.travis.yml)).
48
-
49
- On Windows simply use
50
- [Rufus::Lua::Win](https://github.com/ukoloff/rufus-lua-win).
51
-
52
- ## Credits
53
-
54
- * [Lua](http://www.lua.org/)
55
- * [MoonScript](http://moonscript.org/)
56
- * [Rufus::Lua](https://github.com/jmettraux/rufus-lua)
57
- * [Travis CI](https://travis-ci.org/)
data/Rakefile DELETED
@@ -1,14 +0,0 @@
1
- require "bundler/gem_tasks"
2
-
3
- desc 'Run tests'
4
- task :test do
5
- require "minitest/autorun"
6
-
7
- require 'rufus/lua/win' if Gem.win_platform?
8
- require 'rufus/lua'
9
- require 'rufus/lua/moon'
10
-
11
- Dir.glob('./test/*.rb'){|f| require f}
12
- end
13
-
14
- task default: :test
@@ -1,29 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'rufus/lua/moon/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "rufus-lua-moon"
8
- spec.version = Rufus::Lua::Moon::VERSION
9
- spec.authors = ["Stas Ukolov"]
10
- spec.email = ["ukoloff@gmail.com"]
11
- spec.description = 'Provides MoonScript for Rufus::Lua interpreter'
12
- spec.summary = ''
13
- spec.homepage = "https://github.com/ukoloff/rufus-lua-moon"
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files`.split($/) +
17
- Dir.glob('vendor/leafo/moon/*.moon')+
18
- Dir.glob('vendor/leafo/moonscript/**/*.lua')
19
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
- spec.require_paths = ["lib"]
22
-
23
- spec.add_development_dependency "bundler", "~> 1.3"
24
- spec.add_development_dependency "rake"
25
- spec.add_development_dependency "minitest"
26
- spec.add_development_dependency "rufus-lua-win" if Gem.win_platform?
27
-
28
- spec.add_dependency "rufus-lua"
29
- end
data/test/chain.rb DELETED
@@ -1,6 +0,0 @@
1
- class TestC < Minitest::Test
2
- def test_chain
3
- s=Rufus::Lua::State.new
4
- assert_equal s, s.moon!
5
- end
6
- end
data/test/compile.rb DELETED
@@ -1,12 +0,0 @@
1
- class TestC < Minitest::Test
2
- def test_compile
3
- s=Rufus::Lua::State.new.moon!
4
- assert s.eval("return require('moonscript').to_lua('x = a b c')")[0]
5
- .gsub(/\s+/, '')['=a(b(c))']
6
- end
7
-
8
- def test_fail
9
- s=Rufus::Lua::State.new.moon!
10
- refute s.eval("return require('moonscript').to_lua 'a=b:'")[0] rescue nil
11
- end
12
- end
data/test/path.rb DELETED
@@ -1,15 +0,0 @@
1
- class TestC < Minitest::Test
2
- def test_path
3
- skip if '0.2.3'==Rufus::Lua::Moon::Version
4
- s=Rufus::Lua::State.new.moon!
5
- s['package']['moonpath']=File.expand_path '../?.moon', __FILE__
6
- assert_equal 3.0, s.eval("return require 'path27'")
7
- end
8
-
9
- def test_fail
10
- s=Rufus::Lua::State.new.moon!
11
- assert_raises(Rufus::Lua::LuaError) do
12
- s.eval "require 'path27'"
13
- end
14
- end
15
- end
data/test/path27.moon DELETED
@@ -1,3 +0,0 @@
1
- a=x: 1+2
2
-
3
- return a.x
data/test/req.rb DELETED
@@ -1,17 +0,0 @@
1
- class TestV < Minitest::Test
2
- def test_require
3
- s=Rufus::Lua::State.new.moon!
4
- {
5
- moonscript: %w(util version),
6
- moon: %w(all),
7
- }.map{|k, v|([nil]+v).map{|i| [k, i].compact*'.'}}
8
- .flatten.each {|f| s.eval "require '#{f}'"}
9
- end
10
-
11
- def test_missing
12
- assert_raises(Rufus::Lua::LuaError) do
13
- s=Rufus::Lua::State.new.moon!
14
- s.eval "require 'moonscript.oops'"
15
- end
16
- end
17
- end
data/test/ver.rb DELETED
@@ -1,23 +0,0 @@
1
- class TestV < Minitest::Test
2
- def test_ver
3
- s=Rufus::Lua::State.new.moon!
4
- luav=s.eval 'return _VERSION'
5
- rufv=Rufus::Lua::VERSION
6
- moonv=s.eval 'return require("moonscript.version").version'
7
- gemv=Rufus::Lua::Moon::VERSION
8
-
9
- len=moonv.length
10
-
11
- assert_equal gemv[0...len], moonv.gsub('-', '.')
12
- c=gemv[len]
13
- assert(c.nil? || '.'==c)
14
-
15
- at_exit do
16
- puts
17
- puts "Lua version #{luav}"
18
- puts "Rufus::Lua version #{rufv}"
19
- puts "MoonScript version #{moonv}"
20
- puts "Rufus::Lua::Moon version #{gemv}"
21
- end
22
- end
23
- end