palette 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -3,3 +3,4 @@ pkg/*
3
3
  .bundle
4
4
  *.DS_Store
5
5
  *.sw[nop]
6
+ tmp
data/Gemfile.lock CHANGED
@@ -1,20 +1,39 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- palette (0.0.1)
4
+ palette (0.0.2)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
8
8
  specs:
9
+ aruba (0.2.4)
10
+ background_process
11
+ cucumber (~> 0.9.3)
12
+ background_process (1.2)
13
+ builder (2.1.2)
14
+ cucumber (0.9.3)
15
+ builder (~> 2.1.2)
16
+ diff-lcs (~> 1.1.2)
17
+ gherkin (~> 2.2.9)
18
+ json (~> 1.4.6)
19
+ term-ansicolor (~> 1.0.5)
20
+ diff-lcs (1.1.2)
21
+ gherkin (2.2.9)
22
+ json (~> 1.4.6)
23
+ term-ansicolor (~> 1.0.5)
24
+ json (1.4.6)
9
25
  mocha (0.9.9)
10
26
  rake
11
27
  rake (0.8.7)
12
28
  rspec (1.3.0)
29
+ term-ansicolor (1.0.5)
13
30
 
14
31
  PLATFORMS
15
32
  ruby
16
33
 
17
34
  DEPENDENCIES
35
+ aruba (= 0.2.4)
36
+ cucumber (= 0.9.3)
18
37
  mocha (= 0.9.9)
19
38
  palette!
20
39
  rspec (= 1.3.0)
data/bin/palette ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "palette/cli"
4
+ Palette::Cli.new(*ARGV)
@@ -0,0 +1,13 @@
1
+ Feature: Run palette from the command line
2
+ In order to easily generate Vim color schemes
3
+ As a user of palette
4
+ I should be able to point palette to a file to generate a color schem
5
+
6
+ Scenario: Process a file with valid palette syntax
7
+ When I run "palette features/fixtures/schemes/valid_scheme"
8
+ Then the output should contain "colors_name"
9
+
10
+ Scenario: Process a nonexistant file
11
+ When I run "palette features/fixtures/schemes/missing_scheme"
12
+ Then the output should not contain "colors_name"
13
+ And the exit status should be 0
@@ -0,0 +1,4 @@
1
+ vim_colors "awesomeness" do
2
+ author "Josh Clayton"
3
+ Normal "333", "FFF"
4
+ end
@@ -0,0 +1,10 @@
1
+ Bundler.require
2
+
3
+ require "aruba"
4
+
5
+ Before do
6
+ schemes_origin_dir = File.join(%w(features fixtures schemes))
7
+ schemes_dir = File.join(dirs.first, schemes_origin_dir)
8
+ FileUtils.mkdir_p(schemes_dir)
9
+ FileUtils.cp(Dir.glob(File.join(schemes_origin_dir, "*")), schemes_dir)
10
+ end
@@ -0,0 +1,12 @@
1
+ require "palette"
2
+ module Palette
3
+ class Cli
4
+ def initialize(*args)
5
+ if File.exist?(path = File.expand_path(args.first))
6
+ puts Palette::Dsl.run lambda {
7
+ eval(IO.read(path), binding, path)
8
+ }
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module Palette
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/palette.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require "palette/cli"
1
2
  require "palette/dsl"
2
3
  require "palette/color_scheme"
3
4
  require "palette/color"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: palette
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Clayton
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-28 00:00:00 -04:00
18
+ date: 2010-11-02 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -50,11 +50,43 @@ dependencies:
50
50
  version: 0.9.9
51
51
  type: :development
52
52
  version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: cucumber
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - "="
60
+ - !ruby/object:Gem::Version
61
+ hash: 61
62
+ segments:
63
+ - 0
64
+ - 9
65
+ - 3
66
+ version: 0.9.3
67
+ type: :development
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
70
+ name: aruba
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - "="
76
+ - !ruby/object:Gem::Version
77
+ hash: 31
78
+ segments:
79
+ - 0
80
+ - 2
81
+ - 4
82
+ version: 0.2.4
83
+ type: :development
84
+ version_requirements: *id004
53
85
  description: Palette provides an easy way to build Vim color schemes
54
86
  email:
55
87
  - joshua.clayton@gmail.com
56
- executables: []
57
-
88
+ executables:
89
+ - palette
58
90
  extensions: []
59
91
 
60
92
  extra_rdoc_files: []
@@ -65,14 +97,18 @@ files:
65
97
  - Gemfile.lock
66
98
  - README.markdown
67
99
  - Rakefile
100
+ - bin/palette
68
101
  - lib/palette.rb
102
+ - lib/palette/cli.rb
69
103
  - lib/palette/color.rb
70
104
  - lib/palette/color_scheme.rb
71
105
  - lib/palette/dsl.rb
72
106
  - lib/palette/link.rb
73
107
  - lib/palette/rule.rb
74
108
  - lib/palette/version.rb
75
- - palette.gemspec
109
+ - features/cli.feature
110
+ - features/fixtures/schemes/valid_scheme
111
+ - features/support/env.rb
76
112
  - spec/color_scheme_spec.rb
77
113
  - spec/color_spec.rb
78
114
  - spec/dsl_spec.rb
@@ -114,6 +150,9 @@ signing_key:
114
150
  specification_version: 3
115
151
  summary: Build Vim colorschemes with ease
116
152
  test_files:
153
+ - features/cli.feature
154
+ - features/fixtures/schemes/valid_scheme
155
+ - features/support/env.rb
117
156
  - spec/color_scheme_spec.rb
118
157
  - spec/color_spec.rb
119
158
  - spec/dsl_spec.rb
data/palette.gemspec DELETED
@@ -1,24 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "palette/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "palette"
7
- s.version = Palette::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["Josh Clayton"]
10
- s.email = ["joshua.clayton@gmail.com"]
11
- s.homepage = "http://rubygems.org/gems/palette"
12
- s.summary = %q{Build Vim colorschemes with ease}
13
- s.description = %q{Palette provides an easy way to build Vim color schemes}
14
-
15
- all_files = %x{git ls-files}.split("\n")
16
-
17
- s.files = all_files.reject {|file| file =~ /^(spec|features|cucumber)/ }
18
- s.test_files = all_files.select {|file| file =~ /^(spec|features|cucumber)/ }
19
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
- s.require_paths = ["lib"]
21
-
22
- s.add_development_dependency "rspec", "1.3.0"
23
- s.add_development_dependency "mocha", "0.9.9"
24
- end