llt 0.0.1 → 0.0.2
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 +4 -4
- data/.gitignore +1 -0
- data/Gemfile +9 -9
- data/bin/llt +7 -0
- data/bin/rackup +16 -0
- data/config.ru +3 -0
- data/config/warble.rb +19 -0
- data/lib/llt/cli.rb +60 -0
- data/lib/llt/version.rb +1 -1
- data/llt.gemspec +1 -0
- metadata +64 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 604ec9b36e98e069903541a98acf14696dac8fd0
|
4
|
+
data.tar.gz: e831fa21d882c0e9b6cfc8dc4445aaa8410d6267
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f5f687c5a7f8e7b9ead461bf727d5330c39a894ad390459ecb0af9e7ed390bb040be8289024cc20fe2bfcab767221eeaccee7776a823657bdd57ab404915e91
|
7
|
+
data.tar.gz: f5a2e4c97a04f11651874046a7688707b03ce4529bcde4f254978ffdc83d86d6d94a4b45140d4cbe9e4e5af5f94c92adddde4de073a1cd1b4221bb81003129d9
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -5,17 +5,17 @@ gemspec
|
|
5
5
|
|
6
6
|
gem 'coveralls', require: false
|
7
7
|
|
8
|
-
gem 'llt-core', git: '
|
9
|
-
gem 'llt-constants', git: '
|
10
|
-
gem 'llt-db_handler', git: '
|
11
|
-
gem 'llt-helpers', git: '
|
12
|
-
gem 'llt-logger', git: '
|
13
|
-
gem 'llt-segmenter', git: '
|
14
|
-
gem 'llt-tokenizer', git: '
|
8
|
+
gem 'llt-core', git: 'git://github.com/latin-language-toolkit/llt-core.git'
|
9
|
+
gem 'llt-constants', git: 'git://github.com/latin-language-toolkit/llt-constants.git'
|
10
|
+
gem 'llt-db_handler', git: 'git://github.com/latin-language-toolkit/llt-db_handler.git'
|
11
|
+
gem 'llt-helpers', git: 'git://github.com/latin-language-toolkit/llt-helpers.git'
|
12
|
+
gem 'llt-logger', git: 'git://github.com/latin-language-toolkit/llt-logger.git'
|
13
|
+
gem 'llt-segmenter', git: 'git://github.com/latin-language-toolkit/llt-segmenter.git'
|
14
|
+
gem 'llt-tokenizer', git: 'git://github.com/latin-language-toolkit/llt-tokenizer.git'
|
15
15
|
|
16
16
|
# Dependencies of db_handler
|
17
|
-
gem 'llt-core_extensions', git: '
|
18
|
-
gem 'llt-form_builder', git: '
|
17
|
+
gem 'llt-core_extensions', git: 'git://github.com/latin-language-toolkit/llt-core_extensions.git'
|
18
|
+
gem 'llt-form_builder', git: 'git://github.com/latin-language-toolkit/llt-form_builder.git'
|
19
19
|
|
20
20
|
platform :ruby do
|
21
21
|
gem 'pg'
|
data/bin/llt
ADDED
data/bin/rackup
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rackup' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rack', 'rackup')
|
data/config.ru
CHANGED
data/config/warble.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# Disable Rake-environment-task framework detection by uncommenting/setting to false
|
2
|
+
# Warbler.framework_detection = false
|
3
|
+
|
4
|
+
# Warbler web application assembly configuration file
|
5
|
+
Warbler::Config.new do |config|
|
6
|
+
# We are using the gemspec instead, as the Gemfile itself is
|
7
|
+
# pointing to edge versions of dependent gems. It also seems
|
8
|
+
# that warbler has all kinds of troubles when pulling in gems
|
9
|
+
# from git...
|
10
|
+
config.bundler = false
|
11
|
+
|
12
|
+
# These gems are jruby only, we cannot include them in the gemspecs, as they
|
13
|
+
# would break MRI compatibility.
|
14
|
+
config.gems << 'activerecord-jdbcpostgresql-adapter'
|
15
|
+
config.gems << 'jruby-httpclient'
|
16
|
+
|
17
|
+
# Set JRuby to run in 2.0 mode.
|
18
|
+
config.webxml.jruby.compat.version = "2.0"
|
19
|
+
end
|
data/lib/llt/cli.rb
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'bundler'
|
3
|
+
|
4
|
+
module LLT
|
5
|
+
class CLI < Thor
|
6
|
+
include Thor::Actions
|
7
|
+
|
8
|
+
BASE_DIR = File.expand_path('../../..', __FILE__)
|
9
|
+
|
10
|
+
desc 'deploy', 'deploys llt as war after updating all llt gems'
|
11
|
+
method_option :tomcat, aliases: '-t',
|
12
|
+
desc: 'path to Tomcat directory to copy the war file to'
|
13
|
+
method_option :restart_server, type: :boolean, aliases: '-r',
|
14
|
+
desc: 'Works only when -t is given'
|
15
|
+
def deploy
|
16
|
+
inside BASE_DIR do
|
17
|
+
update_gems(llt_gems)
|
18
|
+
run_warbler
|
19
|
+
deploy_to_tomcat(options)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
no_commands do
|
24
|
+
def llt_gems
|
25
|
+
File.read('Gemfile').each_line.with_object([]) do |line, arr|
|
26
|
+
arr << $1 if line.match(/^gem '(llt-.*?)'/)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def update_gems(gems)
|
31
|
+
say_status('updating', '')
|
32
|
+
gem_list = `gem list`
|
33
|
+
to_update, to_install = gems.partition { |gem| gem_list.match(/#{gem}/)}
|
34
|
+
system "gem install #{to_install.join(' ')}" if to_install.any?
|
35
|
+
system "gem update #{to_update.join(' ')}"
|
36
|
+
end
|
37
|
+
|
38
|
+
def run_warbler
|
39
|
+
say_status('warbling', '')
|
40
|
+
Bundler.with_clean_env { system 'warble' }
|
41
|
+
end
|
42
|
+
|
43
|
+
def deploy_to_tomcat(options)
|
44
|
+
if tomcat = options[:tomcat]
|
45
|
+
app_dir = File.join(tomcat, 'webapps')
|
46
|
+
say_status(:copying, "llt.war => #{app_dir}")
|
47
|
+
system("cp llt.war #{app_dir}")
|
48
|
+
restart(tomcat) if options[:restart_server]
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def restart(tomcat)
|
53
|
+
bin_dir = File.join(tomcat, 'bin')
|
54
|
+
say_status(:restarting, '')
|
55
|
+
system("#{bin_dir}/shutdown.sh")
|
56
|
+
system("#{bin_dir}/startup.sh")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
data/lib/llt/version.rb
CHANGED
data/llt.gemspec
CHANGED
metadata
CHANGED
@@ -1,116 +1,136 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: llt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LFDM, christof, lichtr
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
|
-
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
|
-
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
23
|
requirements:
|
22
|
-
- - ~>
|
24
|
+
- - "~>"
|
23
25
|
- !ruby/object:Gem::Version
|
24
26
|
version: '1.3'
|
25
|
-
prerelease: false
|
26
|
-
type: :development
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
29
36
|
version_requirements: !ruby/object:Gem::Requirement
|
30
37
|
requirements:
|
31
|
-
- -
|
38
|
+
- - ">="
|
32
39
|
- !ruby/object:Gem::Version
|
33
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
34
43
|
requirement: !ruby/object:Gem::Requirement
|
35
44
|
requirements:
|
36
|
-
- -
|
45
|
+
- - ">="
|
37
46
|
- !ruby/object:Gem::Version
|
38
47
|
version: '0'
|
39
|
-
prerelease: false
|
40
48
|
type: :development
|
41
|
-
|
42
|
-
name: rspec
|
49
|
+
prerelease: false
|
43
50
|
version_requirements: !ruby/object:Gem::Requirement
|
44
51
|
requirements:
|
45
|
-
- -
|
52
|
+
- - ">="
|
46
53
|
- !ruby/object:Gem::Version
|
47
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: simplecov
|
48
57
|
requirement: !ruby/object:Gem::Requirement
|
49
58
|
requirements:
|
50
|
-
- -
|
59
|
+
- - "~>"
|
51
60
|
- !ruby/object:Gem::Version
|
52
|
-
version: '0'
|
53
|
-
prerelease: false
|
61
|
+
version: '0.7'
|
54
62
|
type: :development
|
55
|
-
|
56
|
-
name: simplecov
|
63
|
+
prerelease: false
|
57
64
|
version_requirements: !ruby/object:Gem::Requirement
|
58
65
|
requirements:
|
59
|
-
- - ~>
|
66
|
+
- - "~>"
|
60
67
|
- !ruby/object:Gem::Version
|
61
68
|
version: '0.7'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: llt-segmenter
|
62
71
|
requirement: !ruby/object:Gem::Requirement
|
63
72
|
requirements:
|
64
|
-
- -
|
73
|
+
- - ">="
|
65
74
|
- !ruby/object:Gem::Version
|
66
|
-
version: '0
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
67
77
|
prerelease: false
|
68
|
-
type: :development
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: llt-segmenter
|
71
78
|
version_requirements: !ruby/object:Gem::Requirement
|
72
79
|
requirements:
|
73
|
-
- -
|
80
|
+
- - ">="
|
74
81
|
- !ruby/object:Gem::Version
|
75
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: llt-tokenizer
|
76
85
|
requirement: !ruby/object:Gem::Requirement
|
77
86
|
requirements:
|
78
|
-
- -
|
87
|
+
- - ">="
|
79
88
|
- !ruby/object:Gem::Version
|
80
89
|
version: '0'
|
81
|
-
prerelease: false
|
82
90
|
type: :runtime
|
83
|
-
|
84
|
-
name: llt-tokenizer
|
91
|
+
prerelease: false
|
85
92
|
version_requirements: !ruby/object:Gem::Requirement
|
86
93
|
requirements:
|
87
|
-
- -
|
94
|
+
- - ">="
|
88
95
|
- !ruby/object:Gem::Version
|
89
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: thor
|
90
99
|
requirement: !ruby/object:Gem::Requirement
|
91
100
|
requirements:
|
92
|
-
- -
|
101
|
+
- - ">="
|
93
102
|
- !ruby/object:Gem::Version
|
94
103
|
version: '0'
|
95
|
-
prerelease: false
|
96
104
|
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
description: LLT meta gem
|
98
112
|
email:
|
99
113
|
- 1986gh@gmail.com
|
100
|
-
executables:
|
114
|
+
executables:
|
115
|
+
- llt
|
116
|
+
- rackup
|
101
117
|
extensions: []
|
102
118
|
extra_rdoc_files: []
|
103
119
|
files:
|
104
|
-
- .gitignore
|
105
|
-
- .rspec
|
106
|
-
- .travis.yml
|
120
|
+
- ".gitignore"
|
121
|
+
- ".rspec"
|
122
|
+
- ".travis.yml"
|
107
123
|
- Gemfile
|
108
124
|
- LICENSE.txt
|
109
125
|
- README.md
|
110
126
|
- Rakefile
|
127
|
+
- bin/llt
|
128
|
+
- bin/rackup
|
111
129
|
- config.ru
|
130
|
+
- config/warble.rb
|
112
131
|
- lib/llt.rb
|
113
132
|
- lib/llt/api.rb
|
133
|
+
- lib/llt/cli.rb
|
114
134
|
- lib/llt/version.rb
|
115
135
|
- llt.gemspec
|
116
136
|
- spec/lib/llt/api_spec.rb
|
@@ -120,24 +140,24 @@ homepage: ''
|
|
120
140
|
licenses:
|
121
141
|
- MIT
|
122
142
|
metadata: {}
|
123
|
-
post_install_message:
|
143
|
+
post_install_message:
|
124
144
|
rdoc_options: []
|
125
145
|
require_paths:
|
126
146
|
- lib
|
127
147
|
required_ruby_version: !ruby/object:Gem::Requirement
|
128
148
|
requirements:
|
129
|
-
- -
|
149
|
+
- - ">="
|
130
150
|
- !ruby/object:Gem::Version
|
131
151
|
version: '0'
|
132
152
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
153
|
requirements:
|
134
|
-
- -
|
154
|
+
- - ">="
|
135
155
|
- !ruby/object:Gem::Version
|
136
156
|
version: '0'
|
137
157
|
requirements: []
|
138
|
-
rubyforge_project:
|
139
|
-
rubygems_version: 2.
|
140
|
-
signing_key:
|
158
|
+
rubyforge_project:
|
159
|
+
rubygems_version: 2.2.0
|
160
|
+
signing_key:
|
141
161
|
specification_version: 4
|
142
162
|
summary: LLT meta gem
|
143
163
|
test_files:
|