closx 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YjVjYjdkZWE1MzFkY2FjOTgzODg2ODIyY2JlNTcxZGUxMmNjYTRkOQ==
5
- data.tar.gz: !binary |-
6
- YTIwNGY4YTk1YWYzMGRmNzZkZGE2NTRkY2Q3ZjdkYmNkZWI0ZGU3Nw==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- Y2EzNTlhMTc3ZDE1MDdjYTQ1MTQ3NzRmNWEzMTM5Njc0ZGM2ODVhOTk5YmE5
10
- ZTA4YTMyYzBjNTRlODdkMTkyYjQxM2QxNjRkOGU2M2I4YjVmNjEzN2E0ZmVi
11
- NDU1ZDJmZjU5YTFhZDZjNTEyN2JhYTcwOGE5MzU2NzE4MWYxNzQ=
12
- data.tar.gz: !binary |-
13
- MjIzMzE0MTczNmJlNWUzYTg2NTNiZGM4ZGUxYTY2ODYzMWQ4OWYwZDA5ZGUz
14
- NTkyNjI5MTc3ZGZhOTQ3NmU1ZjI4NzY3ODA2NTdhZjNjOTZmMWExMjU1ODVi
15
- MjIyNzE4MTI3ZWQwZjZkZWRhMmM0MTRkYTg1NWVlOWJlNWZjZDY=
2
+ SHA1:
3
+ metadata.gz: 0876009f307675f59f3a87bf2d6cbdf8a5565515
4
+ data.tar.gz: f3f46dc5687d82cfe0b2177c98e9f0dffcedd697
5
+ SHA512:
6
+ metadata.gz: 84fb2e0b18a76a45a7c00b942df828609d46c0ad72ed90d67040db41527cd9bd5c0b1db7679ab36e25a3308f67503fb12c97132b573373ffd937d804efdbf97f
7
+ data.tar.gz: 7d80e21564b52bd088d977ff0d35aad2ae34df71ff279c04312e6a6c67a61bb3233e1cfb0197c58412fd72c7b1b82d5f85df4e8dfee26bd92c76b048095f32c5
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --order random
data/README.md CHANGED
@@ -26,7 +26,6 @@ This is just stupid...
26
26
  ```bash
27
27
  $ closx 'iA Writer'
28
28
  $ closx iA Writer
29
- $ closx ia WRITER
30
29
  ```
31
30
 
32
31
  Eveything works
data/Rakefile CHANGED
@@ -1,10 +1,5 @@
1
1
  require "bundler/gem_tasks"
2
- require 'rake/testtask'
2
+ require 'rspec/core/rake_task'
3
3
 
4
- Rake::TestTask.new do |t|
5
- t.libs << "lib"
6
- t.test_files = FileList['test/*_test.rb']
7
- t.verbose = true
8
- end
9
-
10
- task :default => :test
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task :default => :spec
data/lib/closx.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Closx
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.4"
3
3
 
4
4
  class << self
5
5
  def from_path path
@@ -0,0 +1,27 @@
1
+ require 'closx'
2
+
3
+ describe Closx do
4
+ shared_examples 'closx' do
5
+ describe '#name' do
6
+ it { expect(subject.name).to eq "iawriter" }
7
+ end
8
+
9
+ describe '#full_name' do
10
+ it { expect(subject.full_name).to eq "iA Writer" }
11
+ end
12
+
13
+ describe '#script' do
14
+ it { expect(subject.script).to match /open\ -a \"iA Writer\" \"\$1\"/ }
15
+ end
16
+ end
17
+
18
+ context 'with given argument' do
19
+ subject { described_class.new "iA Writer" }
20
+ it_behaves_like 'closx'
21
+ end
22
+
23
+ context 'with given path' do
24
+ subject { described_class.from_path '/Applications/iA Writer.app' }
25
+ it_behaves_like 'closx'
26
+ end
27
+ end
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: closx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Teo Ljungberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-26 00:00:00.000000000 Z
11
+ date: 2013-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- prerelease: false
15
14
  name: bundler
16
- version_requirements: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ~>
19
- - !ruby/object:Gem::Version
20
- version: '1.3'
21
15
  requirement: !ruby/object:Gem::Requirement
22
16
  requirements:
23
17
  - - ~>
24
18
  - !ruby/object:Gem::Version
25
19
  version: '1.3'
26
20
  type: :development
27
- - !ruby/object:Gem::Dependency
28
21
  prerelease: false
29
- name: rake
30
22
  version_requirements: !ruby/object:Gem::Requirement
31
23
  requirements:
32
- - - ! '>='
24
+ - - ~>
33
25
  - !ruby/object:Gem::Version
34
- version: '0'
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
- - - ! '>='
31
+ - - '>='
38
32
  - !ruby/object:Gem::Version
39
33
  version: '0'
40
34
  type: :development
41
- - !ruby/object:Gem::Dependency
42
35
  prerelease: false
43
- name: pry
44
36
  version_requirements: !ruby/object:Gem::Requirement
45
37
  requirements:
46
- - - ! '>='
38
+ - - '>='
47
39
  - !ruby/object:Gem::Version
48
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
55
  description: Creating quick and dirty scripts for opening OS X apps
56
56
  email:
57
57
  - teo.ljungberg@gmail.com
@@ -61,6 +61,7 @@ extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
63
  - .gitignore
64
+ - .rspec
64
65
  - .travis.yml
65
66
  - Gemfile
66
67
  - LICENSE.txt
@@ -69,8 +70,7 @@ files:
69
70
  - bin/closx
70
71
  - closx.gemspec
71
72
  - lib/closx.rb
72
- - test/closx_test.rb
73
- - test/test_helper.rb
73
+ - spec/closx_spec.rb
74
74
  homepage: https://github.com/metamorfos/closx
75
75
  licenses:
76
76
  - MIT
@@ -81,12 +81,12 @@ require_paths:
81
81
  - lib
82
82
  required_ruby_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - ! '>='
84
+ - - '>='
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ! '>='
89
+ - - '>='
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
@@ -96,5 +96,4 @@ signing_key:
96
96
  specification_version: 4
97
97
  summary: Creating quick and dirty scripts for opening OS X apps
98
98
  test_files:
99
- - test/closx_test.rb
100
- - test/test_helper.rb
99
+ - spec/closx_spec.rb
data/test/closx_test.rb DELETED
@@ -1,36 +0,0 @@
1
- require_relative 'test_helper'
2
-
3
- class TestClosx < MiniTest::Unit::TestCase
4
- def setup
5
- @app = Closx.new(app_name)
6
- end
7
-
8
- def test_name
9
- assert @app.name, "iawriter"
10
- end
11
-
12
- def test_full_name
13
- assert Closx.new('GoOGLe chROMe').full_name, "Google Chrome"
14
- end
15
-
16
- def test_script
17
- assert @app.script, /open\ -a \"#{app_name}\" \"\$1\"/
18
- end
19
-
20
- def test_from_path
21
- app_from_path = Closx.from_path(app_path)
22
- assert app_from_path.name, "iawriter"
23
- assert app_from_path.full_name, "iA Writer"
24
- assert app_from_path.script, /open\ -a \"#{app_name}\" \"\$1\"/
25
- end
26
-
27
- private
28
-
29
- def app_name
30
- "iA Writer"
31
- end
32
-
33
- def app_path
34
- "/Applications/iA Writer.app"
35
- end
36
- end
data/test/test_helper.rb DELETED
@@ -1,3 +0,0 @@
1
- require 'minitest/autorun'
2
- require 'pry'
3
- require_relative '../lib/closx'