codeunion 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f3a8dc759f3f6ff3bdc7ff87a232083fce375484
4
+ data.tar.gz: 56d65da1ad015b6498cd59037d112affbb57ed95
5
+ SHA512:
6
+ metadata.gz: 681f8d162e0628ecd806e0d146952d94fe119ca0bdf5bf28c88dde69efb3a0d47a070dcbfe569ac352eb873d83fd9057fcdb42530ab492c5d40347ec89ce41ed
7
+ data.tar.gz: 4d7a990783baddec49977d75eb516562b1c9800b846d6cee24b7d642c2afd3342a97a26a14c193e48095548aeb596471c551524ffae2a0b071b62f02c5eb1d49
@@ -0,0 +1,82 @@
1
+ ## Gem-specific files:
2
+ Gemfile.lock
3
+ .ruby-version
4
+ .ruby-gemset
5
+ .rvmrc
6
+
7
+ *.gem
8
+ *.bundle
9
+ *.rbc
10
+ *.so
11
+ *.o
12
+ *.a
13
+ mkmf.log
14
+ /.config
15
+ /coverage/
16
+
17
+ ## Ruby-specific files:
18
+ /InstalledFiles
19
+ /pkg/
20
+ /spec/reports/
21
+ /test/tmp/
22
+ /test/version_tmp/
23
+ /tmp/
24
+
25
+ ## Documentation cache and generated files:
26
+ /.yardoc/
27
+ /_yardoc/
28
+ /doc/
29
+ /rdoc/
30
+
31
+ ## Environment normalisation:
32
+ /.bundle/
33
+ /lib/bundler/man/
34
+
35
+ ## Vim-specific files:
36
+ [._]*.s[a-w][a-z]
37
+ [._]s[a-w][a-z]
38
+ *.un~
39
+ Session.vim
40
+ .netrwhist
41
+ *~
42
+
43
+ ## Sublime Text-specific files:
44
+ # Cache files for sublime text
45
+ *.tmlanguage.cache
46
+ *.tmPreferences.cache
47
+ *.stTheme.cache
48
+
49
+ # Sublime workspace and project settings are user-specific
50
+ *.sublime-workspace
51
+ *.sublime-project
52
+
53
+ # Sublime SFTP configuration file
54
+ sftp-config.json
55
+
56
+ ## TextMate-specific files:
57
+ *.tmproj
58
+ *.tmproject
59
+ tmtags
60
+
61
+ ## Cloud9-specific files:
62
+ .c9revisions
63
+ .c9
64
+
65
+ ## OS X-specific files:
66
+ .DS_Store
67
+ .AppleDouble
68
+ .LSOverride
69
+ ._*
70
+
71
+ ## Windows-specific files:
72
+ # Windows image file caches
73
+ Thumbs.db
74
+ ehthumbs.db
75
+
76
+ # Folder config file
77
+ Desktop.ini
78
+
79
+ ## Linux-specific files:
80
+
81
+ # KDE directory preferences
82
+ .directory
@@ -0,0 +1,11 @@
1
+ AllCops:
2
+ Exclude:
3
+ - '*.gemspec'
4
+
5
+ Style/Documentation:
6
+ Exclude:
7
+ - 'lib/codeunion/version.rb'
8
+
9
+ Style/StringLiterals:
10
+ Enabled: true
11
+ EnforcedStyle: double_quotes
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in codeunion-client.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 CodeUnion, Inc. <hello@codeunion.io>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,35 @@
1
+ # The CodeUnion Command-Line Tool
2
+
3
+ The CodeUnion command-line tool is meant to be used in conjunction with
4
+ CodeUnion's curriculum. Think of it as your "learning sherpa."
5
+
6
+ ## Installing
7
+
8
+ To install the CodeUnion command-line tool, run
9
+
10
+ ```shell-session
11
+ $ gem install codeunion
12
+ ```
13
+
14
+ If you're using [rbenv](http://rbenv.org/) to manage your Ruby environment,
15
+ make sure to run
16
+
17
+ ```shell-session
18
+ $ rbenv rehash
19
+ ```
20
+
21
+ after you install the gem. This is required for rbenv to pick up any new
22
+ executables installed by a gem, including ours.
23
+
24
+ ## Subcommands
25
+
26
+ The command-line tool is organized into subcommands, a la git. If we were to
27
+ run this command, for example
28
+
29
+ ```shell-session
30
+ $ codeunion waffles
31
+ ```
32
+
33
+ the CodeUnion tool would look for an executable named `codeunion-waffles`. If
34
+ the executable exists, the tool will run it. If it doesn't exist, we would see
35
+ a `CommandNotFound` error.
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: UTF-8
3
+
4
+ # Resolve the pathname for this executable
5
+ require "pathname"
6
+ bin_file = Pathname.new(__FILE__).realpath
7
+
8
+ # Add the gem's "lib" directory to library path
9
+ $LOAD_PATH.unshift File.expand_path("../../lib", bin_file)
10
+
11
+ require "codeunion/cli"
12
+ CodeUnion::CLI.start(*ARGV)
@@ -0,0 +1,26 @@
1
+ # encoding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "codeunion/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "codeunion"
8
+ spec.version = CodeUnion::VERSION
9
+ spec.authors = ["Jesse Farmer"]
10
+ spec.email = ["jesse@codeunion.io"]
11
+ spec.summary = "The CodeUnion Command-Line Tool"
12
+ spec.description = "The CodeUnion command-line tool helps students work through CodeUnion's curriculum."
13
+ spec.homepage = "http://github.com/codeunion/codeunion-client"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "rubocop", "~> 0.27"
24
+
25
+ spec.add_dependency "ptools", "~> 1.2"
26
+ end
@@ -0,0 +1 @@
1
+ require "codeunion/version"
@@ -0,0 +1,13 @@
1
+ require "codeunion"
2
+ require "codeunion/command"
3
+
4
+ module CodeUnion
5
+ # This class serves as a simple command-line client
6
+ class CLI
7
+ def self.start(*args)
8
+ subcommand = args.shift.strip
9
+
10
+ CodeUnion::Command.new(subcommand, *args).exec!
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,34 @@
1
+ require "codeunion"
2
+ require "ptools"
3
+
4
+ module CodeUnion
5
+ # This class serves as a simple wrapper around subcommands
6
+ class Command
7
+ class CommandNotFound < StandardError; end
8
+
9
+ def initialize(command, *args)
10
+ @command = command
11
+ @args = args
12
+ end
13
+
14
+ def exist?
15
+ File.which(executable_name)
16
+ end
17
+
18
+ def exec!
19
+ if exist?
20
+ exec(executable_name, *args)
21
+ else
22
+ fail CommandNotFound, "Unknown command `#{@command}`."
23
+ end
24
+ end
25
+
26
+ private
27
+
28
+ attr_reader :command, :args
29
+
30
+ def executable_name
31
+ "codeunion-#{command}"
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,3 @@
1
+ module CodeUnion
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,114 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: codeunion
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jesse Farmer
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-12-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.27'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.27'
55
+ - !ruby/object:Gem::Dependency
56
+ name: ptools
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.2'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.2'
69
+ description: The CodeUnion command-line tool helps students work through CodeUnion's
70
+ curriculum.
71
+ email:
72
+ - jesse@codeunion.io
73
+ executables:
74
+ - codeunion
75
+ extensions: []
76
+ extra_rdoc_files: []
77
+ files:
78
+ - ".gitignore"
79
+ - ".rubocop.yml"
80
+ - Gemfile
81
+ - LICENSE
82
+ - README.md
83
+ - Rakefile
84
+ - bin/codeunion
85
+ - codeunion.gemspec
86
+ - lib/codeunion.rb
87
+ - lib/codeunion/cli.rb
88
+ - lib/codeunion/command.rb
89
+ - lib/codeunion/version.rb
90
+ homepage: http://github.com/codeunion/codeunion-client
91
+ licenses:
92
+ - MIT
93
+ metadata: {}
94
+ post_install_message:
95
+ rdoc_options: []
96
+ require_paths:
97
+ - lib
98
+ required_ruby_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ required_rubygems_version: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ requirements: []
109
+ rubyforge_project:
110
+ rubygems_version: 2.2.2
111
+ signing_key:
112
+ specification_version: 4
113
+ summary: The CodeUnion Command-Line Tool
114
+ test_files: []