projectionist-projects 0.1.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.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/README.md +1 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/exe/projection +66 -0
- data/lib/projectionist/projects/version.rb +5 -0
- data/lib/projectionist/projects.rb +7 -0
- data/projectionist-projects.gemspec +23 -0
- data/projections/ember.projections.json +183 -0
- metadata +87 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8a868c2957b55f05de3bef7d628bb4b8f3136443
|
4
|
+
data.tar.gz: bcc8875894c4bdff41daf7e5ecf38abd72c91fa1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6dedf5a8b48e9cc258cea660390ea71fa0e0cb2fd05dde55f5f44658c89eb4efb0889f2a74cf26d10fb2acc4d282d4d6f74ac31f71a63be977f3044959a241e1
|
7
|
+
data.tar.gz: dfdbcce0341b4777e79708f8d1bd26569ed4715850d9ac0698dcd7545cdfd11e195f5d28c65850c64be33a0c12ed6122d75ecc71d3644a008694e289d644f2a2
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# projectionist-projects
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "projectionist/projects"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/exe/projection
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
gem "highline"
|
4
|
+
|
5
|
+
require "highline/import"
|
6
|
+
require "pathname"
|
7
|
+
require "fileutils"
|
8
|
+
require "optparse"
|
9
|
+
|
10
|
+
include FileUtils
|
11
|
+
|
12
|
+
terminal_width, _ = HighLine::SystemExtensions.terminal_size
|
13
|
+
projections_path = File.expand_path("../../projections", __FILE__)
|
14
|
+
available_files = Dir["#{projections_path}/*.projections.json"]
|
15
|
+
@names_to_files = Hash[available_files.map do |filename|
|
16
|
+
name = Pathname.new(filename).basename(".projections.json").to_s
|
17
|
+
[name, filename]
|
18
|
+
end]
|
19
|
+
|
20
|
+
def copy_projection(name, source, destination = "#{getwd}/.projections.json")
|
21
|
+
colored_name = HighLine::String.new(name).color(:red)
|
22
|
+
unless source
|
23
|
+
puts "#{colored_name} projection was not found. Use `projection -l` to show available projection files."
|
24
|
+
exit -1
|
25
|
+
end
|
26
|
+
|
27
|
+
cp source, destination
|
28
|
+
puts "Projection #{colored_name} was copied to the current directory."
|
29
|
+
end
|
30
|
+
|
31
|
+
if ARGV.count > 0
|
32
|
+
parser = OptionParser.new do |opts|
|
33
|
+
opts.banner = "Usage: projection [options]"
|
34
|
+
|
35
|
+
opts.on("-l", "--list", "List available projection names") do |list|
|
36
|
+
@names_to_files.each do |name, path|
|
37
|
+
puts name
|
38
|
+
end
|
39
|
+
exit
|
40
|
+
end
|
41
|
+
|
42
|
+
opts.on("-p", "--path [name]", "Lists out the paths for the matching name") do |value|
|
43
|
+
value ||= ""
|
44
|
+
filtered = @names_to_files.select { |name| name.downcase.include? value.downcase }
|
45
|
+
maximum = filtered.keys.map(&:length).max
|
46
|
+
filtered.each do |name, path|
|
47
|
+
puts "#{HighLine::String.new(name.ljust(maximum)).color(:bold, :blue)} #{HighLine::String.new("=>").color(:cyan)} #{HighLine::String.new(path).color(:green)}"
|
48
|
+
end
|
49
|
+
exit
|
50
|
+
end
|
51
|
+
|
52
|
+
opts.on_tail("-h", "--help") do
|
53
|
+
puts opts
|
54
|
+
exit
|
55
|
+
end
|
56
|
+
|
57
|
+
copy_projection ARGV.first, @names_to_files[ARGV.first]
|
58
|
+
end
|
59
|
+
|
60
|
+
parser.parse!
|
61
|
+
else
|
62
|
+
choose do |menu|
|
63
|
+
menu.prompt = "What type of project? "
|
64
|
+
menu.choices(*@names_to_files.keys) { |name| copy_projection name, @names_to_files[name] }
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'projectionist/projects/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "projectionist-projects"
|
8
|
+
spec.version = Projectionist::Projects::VERSION
|
9
|
+
spec.authors = ["Jeremy W. Rowe"]
|
10
|
+
spec.email = ["jeremy.w.rowe@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{A quick and dirty script for installing projectionist files in the current directory}
|
13
|
+
spec.description = %q{Projectionist + vim make it easier to jump between alternate files. Configuration of projectionist is mind numbing, I hope to reduce that by adding projectionist project files over time.}
|
14
|
+
spec.homepage = "https://github.com/jeremywrowe/projectionist-projects"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = "exe"
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
end
|
@@ -0,0 +1,183 @@
|
|
1
|
+
{
|
2
|
+
"app/adapters/*.js": {
|
3
|
+
"command": "adapter",
|
4
|
+
"template": [
|
5
|
+
"import ApplicationAdapter from './application';",
|
6
|
+
"",
|
7
|
+
"export default ApplicationAdapter.extend({",
|
8
|
+
"",
|
9
|
+
"});"
|
10
|
+
],
|
11
|
+
"alternate": "tests/unit/adapters/{}-test.js"
|
12
|
+
},
|
13
|
+
|
14
|
+
"tests/unit/adapters/*-test.js": {
|
15
|
+
"command": "adapterTest",
|
16
|
+
"template": [
|
17
|
+
"import {open} moduleFor, test {close} from 'ember-qunit';",
|
18
|
+
"",
|
19
|
+
"moduleFor('adapter:{}');",
|
20
|
+
"",
|
21
|
+
"test('it adapts', function(assert) {",
|
22
|
+
" var adapter = this.subject();",
|
23
|
+
" assert.ok(adapter);",
|
24
|
+
"});"
|
25
|
+
],
|
26
|
+
"alternate": "app/adapters/{}.js"
|
27
|
+
},
|
28
|
+
|
29
|
+
"app/components/*.js": {
|
30
|
+
"command": "component",
|
31
|
+
"template": [
|
32
|
+
"import Ember from 'ember';",
|
33
|
+
"",
|
34
|
+
"export default Ember.Component.extend({",
|
35
|
+
"",
|
36
|
+
"});"
|
37
|
+
],
|
38
|
+
"alternate": "tests/integration/components/{}-test.js"
|
39
|
+
},
|
40
|
+
|
41
|
+
"tests/integration/components/*-test.js": {
|
42
|
+
"command": "componentTest",
|
43
|
+
"template": [
|
44
|
+
"import {open} moduleForComponent, test {close} from 'ember-qunit';",
|
45
|
+
"import t from 'htmlbars-inline-precompile';",
|
46
|
+
"",
|
47
|
+
"moduleForComponent('{}', 'component:{}', {",
|
48
|
+
" integration: true",
|
49
|
+
"});",
|
50
|
+
"",
|
51
|
+
"test('it is a dom building block', function(assert) {",
|
52
|
+
" this.render(t`{open}{open}{}{close}{close}`);",
|
53
|
+
" assert.equal(this.$().text().trim(), 'bob the builder');",
|
54
|
+
"});"
|
55
|
+
],
|
56
|
+
"alternate": "app/components/{}.js"
|
57
|
+
},
|
58
|
+
|
59
|
+
"app/controllers/*.js": {
|
60
|
+
"command": "controller",
|
61
|
+
"template": [
|
62
|
+
"import Ember from 'ember';",
|
63
|
+
"",
|
64
|
+
"export default Ember.Controller.extend({",
|
65
|
+
"",
|
66
|
+
"});"
|
67
|
+
],
|
68
|
+
"alternate": "tests/unit/controllers/{}-test.js"
|
69
|
+
},
|
70
|
+
|
71
|
+
"tests/unit/controllers/*-test.js": {
|
72
|
+
"command": "controllerTest",
|
73
|
+
"template": [
|
74
|
+
"import {open} moduleFor, test {close} from 'ember-qunit';",
|
75
|
+
"",
|
76
|
+
"moduleFor('controller:{}', {open} {close});",
|
77
|
+
"",
|
78
|
+
"test('it remote controls', function(assert) {",
|
79
|
+
" var controller = this.subject();",
|
80
|
+
" assert.ok(controller);",
|
81
|
+
"});"
|
82
|
+
],
|
83
|
+
"alternate": "app/controllers/{}.js"
|
84
|
+
},
|
85
|
+
|
86
|
+
"app/helpers/*.js": {
|
87
|
+
"command": "helper",
|
88
|
+
"template": [
|
89
|
+
"import Ember from 'ember';",
|
90
|
+
"",
|
91
|
+
"export function {camelcase}(params/*, hash*/) {",
|
92
|
+
" return params;",
|
93
|
+
"}",
|
94
|
+
"",
|
95
|
+
"export default Ember.Helper.helper({camelcase});"
|
96
|
+
],
|
97
|
+
"alternate": "tests/unit/helpers/{}-test.js"
|
98
|
+
},
|
99
|
+
|
100
|
+
"tests/unit/helpers/*-test.js": {
|
101
|
+
"command": "helperTest",
|
102
|
+
"template": [
|
103
|
+
"import {open} {camelcase} {close} from '../../../helpers/{}';",
|
104
|
+
"import {open} module, test {close} from 'qunit';",
|
105
|
+
"",
|
106
|
+
"module('helper:{}');",
|
107
|
+
"",
|
108
|
+
"test('aide', function(assert) {",
|
109
|
+
" let result = {camelcase}();",
|
110
|
+
" assert.equal(result, 'a winner is you');",
|
111
|
+
"});"
|
112
|
+
],
|
113
|
+
"alternate": "app/helpers/{}.js"
|
114
|
+
},
|
115
|
+
|
116
|
+
"app/models/*.js": {
|
117
|
+
"command": "model",
|
118
|
+
"template": [
|
119
|
+
"import DS from 'ember-data';",
|
120
|
+
"export default DS.Model.extend({",
|
121
|
+
"",
|
122
|
+
"});"
|
123
|
+
],
|
124
|
+
"alternate": "tests/unit/models/{}-test.js"
|
125
|
+
},
|
126
|
+
|
127
|
+
"tests/unit/models/*-test.js": {
|
128
|
+
"command": "modelTest",
|
129
|
+
"template": [
|
130
|
+
"import {open} moduleForModel, test {close} from 'ember-qunit';",
|
131
|
+
"",
|
132
|
+
"moduleForModel('{}', 'model:{}');",
|
133
|
+
"",
|
134
|
+
"test('fashion show', function(assert) {",
|
135
|
+
" let model = this.subject();",
|
136
|
+
" // let store = this.store();",
|
137
|
+
" assert.equal(model.get('appleBottomJeans'), 'Boots with the fur');",
|
138
|
+
"});"
|
139
|
+
],
|
140
|
+
"alternate": "app/models/{}.js"
|
141
|
+
},
|
142
|
+
|
143
|
+
"app/router.js": {
|
144
|
+
"command": "router"
|
145
|
+
},
|
146
|
+
|
147
|
+
"app/routes/*.js": {
|
148
|
+
"command": "route",
|
149
|
+
"template": [
|
150
|
+
"import Ember from 'ember';",
|
151
|
+
"",
|
152
|
+
"export default Ember.Route.extend({",
|
153
|
+
"",
|
154
|
+
"});"
|
155
|
+
],
|
156
|
+
"alternate": "tests/unit/routes/{}-test.js"
|
157
|
+
},
|
158
|
+
|
159
|
+
"tests/unit/routes/*-test.js": {
|
160
|
+
"command": "routeTest",
|
161
|
+
"template": [
|
162
|
+
"import {open} moduleFor, test {close} from 'ember-qunit';",
|
163
|
+
"",
|
164
|
+
"moduleFor('route:{}');",
|
165
|
+
"",
|
166
|
+
"test('path to success', function(assert) {",
|
167
|
+
" let route = this.subject();",
|
168
|
+
" route.send('action', 1);",
|
169
|
+
" assert.equal(route.get('actionResult'), 1);",
|
170
|
+
"});"
|
171
|
+
],
|
172
|
+
"alternate": "app/routes/{}.js"
|
173
|
+
},
|
174
|
+
|
175
|
+
"app/templates/*.hbs": {
|
176
|
+
"command": "template",
|
177
|
+
"alternate": "app/components/{}.js"
|
178
|
+
},
|
179
|
+
|
180
|
+
"app/utils/*.js": {
|
181
|
+
"command": "util"
|
182
|
+
}
|
183
|
+
}
|
metadata
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: projectionist-projects
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jeremy W. Rowe
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-06 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.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
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
|
+
description: Projectionist + vim make it easier to jump between alternate files. Configuration
|
42
|
+
of projectionist is mind numbing, I hope to reduce that by adding projectionist
|
43
|
+
project files over time.
|
44
|
+
email:
|
45
|
+
- jeremy.w.rowe@gmail.com
|
46
|
+
executables:
|
47
|
+
- projection
|
48
|
+
extensions: []
|
49
|
+
extra_rdoc_files: []
|
50
|
+
files:
|
51
|
+
- ".gitignore"
|
52
|
+
- ".travis.yml"
|
53
|
+
- Gemfile
|
54
|
+
- README.md
|
55
|
+
- Rakefile
|
56
|
+
- bin/console
|
57
|
+
- bin/setup
|
58
|
+
- exe/projection
|
59
|
+
- lib/projectionist/projects.rb
|
60
|
+
- lib/projectionist/projects/version.rb
|
61
|
+
- projectionist-projects.gemspec
|
62
|
+
- projections/ember.projections.json
|
63
|
+
homepage: https://github.com/jeremywrowe/projectionist-projects
|
64
|
+
licenses: []
|
65
|
+
metadata: {}
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options: []
|
68
|
+
require_paths:
|
69
|
+
- lib
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
requirements: []
|
81
|
+
rubyforge_project:
|
82
|
+
rubygems_version: 2.4.6
|
83
|
+
signing_key:
|
84
|
+
specification_version: 4
|
85
|
+
summary: A quick and dirty script for installing projectionist files in the current
|
86
|
+
directory
|
87
|
+
test_files: []
|