consular-osx 1.0.0.rc1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +35 -0
- data/consular-osx.gemspec +1 -1
- data/lib/consular/osx.rb +10 -3
- data/spec/osx_spec.rb +4 -0
- metadata +9 -12
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Consular - OSX Core
|
2
|
+
|
3
|
+
Automate your OSX Terminal with Consular
|
4
|
+
|
5
|
+
|
6
|
+
# Setup && Installation
|
7
|
+
|
8
|
+
If you haven't already, install Consular:
|
9
|
+
|
10
|
+
gem install consular
|
11
|
+
|
12
|
+
then install consular-osx:
|
13
|
+
|
14
|
+
gem install consular-osx
|
15
|
+
|
16
|
+
|
17
|
+
next, run `init`:
|
18
|
+
|
19
|
+
consular init
|
20
|
+
|
21
|
+
This will generate a global directory and also a `.consularc` in your home
|
22
|
+
directory. On the top of your `.consularc`, just require this core like
|
23
|
+
so:
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
# You can require your additional core gems here.
|
27
|
+
require 'consular/osx'
|
28
|
+
|
29
|
+
# You can set specific Consular configurations
|
30
|
+
# here.
|
31
|
+
Consular.configure do |c|
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
35
|
+
Now you can use OSX Terminal to run your Consular scripts!
|
data/consular-osx.gemspec
CHANGED
data/lib/consular/osx.rb
CHANGED
@@ -18,12 +18,19 @@ module Consular
|
|
18
18
|
|
19
19
|
class << self
|
20
20
|
|
21
|
-
# Checks to see if the current system is on darwin
|
22
|
-
#
|
21
|
+
# Checks to see if the current system is on darwin and if
|
22
|
+
# $TERM_PROGRAM is set to Apple_Terminal.
|
23
23
|
#
|
24
24
|
# @api public
|
25
25
|
def valid_system?
|
26
|
-
RUBY_PLATFORM.downcase =~ /darwin/
|
26
|
+
(RUBY_PLATFORM.downcase =~ /darwin/) && ENV['TERM_PROGRAM'] == 'Apple_Terminal'
|
27
|
+
end
|
28
|
+
|
29
|
+
# Returns name of Core. used in CLI core selection
|
30
|
+
#
|
31
|
+
# @api public
|
32
|
+
def to_s
|
33
|
+
"Consular::OSX Mac OSX Terminal"
|
27
34
|
end
|
28
35
|
end
|
29
36
|
|
data/spec/osx_spec.rb
CHANGED
@@ -6,6 +6,10 @@ describe Consular::OSX do
|
|
6
6
|
@core = Consular::OSX.new File.expand_path('../fixtures/bar.term', __FILE__)
|
7
7
|
end
|
8
8
|
|
9
|
+
it "should return name of core with #to_s" do
|
10
|
+
assert_equal "Consular::OSX Mac OSX Terminal", Consular::OSX.to_s
|
11
|
+
end
|
12
|
+
|
9
13
|
it "should have ALLOWED_OPTIONS" do
|
10
14
|
options = Consular::OSX::ALLOWED_OPTIONS
|
11
15
|
|
metadata
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: consular-osx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
9
|
- 0
|
10
|
-
|
11
|
-
- 1
|
12
|
-
version: 1.0.0.rc1
|
10
|
+
version: 1.0.0
|
13
11
|
platform: ruby
|
14
12
|
authors:
|
15
13
|
- Arthur Chiu
|
@@ -17,7 +15,7 @@ autorequire:
|
|
17
15
|
bindir: bin
|
18
16
|
cert_chain: []
|
19
17
|
|
20
|
-
date: 2011-10-
|
18
|
+
date: 2011-10-27 00:00:00 -07:00
|
21
19
|
default_executable:
|
22
20
|
dependencies:
|
23
21
|
- !ruby/object:Gem::Dependency
|
@@ -88,6 +86,7 @@ extra_rdoc_files: []
|
|
88
86
|
files:
|
89
87
|
- .gitignore
|
90
88
|
- Gemfile
|
89
|
+
- README.md
|
91
90
|
- Rakefile
|
92
91
|
- consular-osx.gemspec
|
93
92
|
- lib/consular/osx.rb
|
@@ -116,14 +115,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
116
|
none: false
|
118
117
|
requirements:
|
119
|
-
- - "
|
118
|
+
- - ">="
|
120
119
|
- !ruby/object:Gem::Version
|
121
|
-
hash:
|
120
|
+
hash: 3
|
122
121
|
segments:
|
123
|
-
-
|
124
|
-
|
125
|
-
- 1
|
126
|
-
version: 1.3.1
|
122
|
+
- 0
|
123
|
+
version: "0"
|
127
124
|
requirements: []
|
128
125
|
|
129
126
|
rubyforge_project: consular-osx
|