vandal_ui 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,32 @@
1
+ namespace :vandal do
2
+ task :install do
3
+ source = File.join(File.dirname(__FILE__), 'static')
4
+ destination = "#{Rails.root}/public/api/v1"
5
+ FileUtils.rm_rf "#{destination}/vandal"
6
+ FileUtils.mkdir_p destination
7
+ FileUtils.copy_entry(source, "#{destination}/vandal")
8
+
9
+ # Document schema path and override
10
+ # Commit graphiti incorporating api namespace to schema path. Document the old.
11
+ # Maybe even do this in script?
12
+ #
13
+ # Vandal in isolation
14
+ # Remove demo path from vandal
15
+ # Ensure "open in new tab" works
16
+ # Ensure curl works
17
+ cfg = YAML.load_file("#{Rails.root}/.graphiticfg.yml")
18
+ schema_path = "#{cfg['namespace']}/schema.json"
19
+ path = "#{destination}/vandal/index.html"
20
+ lines = IO.readlines(path).map do |line|
21
+ if line.include?('__SCHEMA_PATH__')
22
+ line.gsub('__SCHEMA_PATH__', ENV.fetch('SCHEMA_PATH', schema_path))
23
+ else
24
+ line
25
+ end
26
+ end
27
+
28
+ File.open(path, 'w') do |file|
29
+ file.puts lines
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,3 @@
1
+ module VandalUi
2
+ VERSION = "0.1.0"
3
+ end
data/lib/vandal_ui.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "vandal_ui/version"
2
+ require "vandal_ui/railtie" if defined?(Rails)
3
+
4
+ module VandalUi
5
+ end
data/vandal_ui.gemspec ADDED
@@ -0,0 +1,27 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "vandal_ui/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "vandal_ui"
8
+ spec.version = VandalUi::VERSION
9
+ spec.authors = ["Lee Richmond"]
10
+ spec.email = ["lrichmond1@bloomberg.net"]
11
+
12
+ spec.summary = %q{UI for Graphiti}
13
+ spec.description = %q{Holds static assets for Vandal UI}
14
+
15
+ # Specify which files should be added to the gem when it is released.
16
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
17
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
18
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ end
20
+ spec.bindir = "exe"
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.16"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "rspec", "~> 3.0"
27
+ end
metadata ADDED
@@ -0,0 +1,108 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vandal_ui
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Lee Richmond
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-01-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.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
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: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ description: Holds static assets for Vandal UI
56
+ email:
57
+ - lrichmond1@bloomberg.net
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".rspec"
64
+ - ".travis.yml"
65
+ - Gemfile
66
+ - Gemfile.lock
67
+ - README.md
68
+ - Rakefile
69
+ - bin/console
70
+ - bin/setup
71
+ - lib/vandal_ui.rb
72
+ - lib/vandal_ui/railtie.rb
73
+ - lib/vandal_ui/static/assets/img/squares.png
74
+ - lib/vandal_ui/static/css/app.4fd96515.css
75
+ - lib/vandal_ui/static/css/chunk-vendors.e6a6ca22.css
76
+ - lib/vandal_ui/static/favicon.ico
77
+ - lib/vandal_ui/static/index.html
78
+ - lib/vandal_ui/static/js/app.dc394b81.js
79
+ - lib/vandal_ui/static/js/app.dc394b81.js.map
80
+ - lib/vandal_ui/static/js/chunk-vendors.326f67bb.js
81
+ - lib/vandal_ui/static/js/chunk-vendors.326f67bb.js.map
82
+ - lib/vandal_ui/tasks.rb
83
+ - lib/vandal_ui/version.rb
84
+ - vandal_ui.gemspec
85
+ homepage:
86
+ licenses: []
87
+ metadata: {}
88
+ post_install_message:
89
+ rdoc_options: []
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ requirements: []
103
+ rubyforge_project:
104
+ rubygems_version: 2.6.13
105
+ signing_key:
106
+ specification_version: 4
107
+ summary: UI for Graphiti
108
+ test_files: []