rstt 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,8 +1,12 @@
1
1
  .rvmrc
2
- spec/rstt_rake_spec.rb
3
2
 
4
- lib/rstt/tt_settings.rb
5
-
6
- tmp/temp.html.haml
7
3
  todos.task
8
- lib/rstt/tt_settings.rb
4
+
5
+ pkg/rstt-0.9.0.gem
6
+
7
+ .DS_Store
8
+
9
+ */.DS_Store
10
+
11
+ Gemfile.lock
12
+ Gemfile.lock
data/Gemfile CHANGED
@@ -3,13 +3,13 @@ source "http://rubygems.org"
3
3
  # Specify your gem's dependencies in rstt.gemspec
4
4
  gemspec
5
5
 
6
- group :development, :test do
7
- gem "rspec"
8
- gem "yard"
9
- gem "syntax"
10
- end
11
-
12
- gem "slop"
13
- gem "thor"
14
- gem "activesupport"
15
- gem "celluloid"
6
+ # group :development, :test do
7
+ # gem "rspec"
8
+ # gem "yard"
9
+ # gem "syntax"
10
+ # end
11
+ #
12
+ # gem "slop"
13
+ # gem "thor"
14
+ # gem "activesupport"
15
+ # gem "celluloid"
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rstt (0.0.1)
5
- activesupport
4
+ rstt (0.9.0)
5
+ active_support
6
6
  celluloid
7
7
  slop
8
8
  thor
@@ -10,13 +10,11 @@ PATH
10
10
  GEM
11
11
  remote: http://rubygems.org/
12
12
  specs:
13
- activesupport (3.2.1)
14
- i18n (~> 0.6)
15
- multi_json (~> 1.0)
16
- celluloid (0.8.0)
13
+ active_support (3.0.0)
14
+ activesupport (= 3.0.0)
15
+ activesupport (3.0.0)
16
+ celluloid (0.9.0)
17
17
  diff-lcs (1.1.3)
18
- i18n (0.6.0)
19
- multi_json (1.0.4)
20
18
  rspec (2.8.0)
21
19
  rspec-core (~> 2.8.0)
22
20
  rspec-expectations (~> 2.8.0)
@@ -1,6 +1,7 @@
1
1
  # coding: utf-8
2
- require "celluloid"
2
+ # used for: mattr_accessor
3
3
  require "active_support/all"
4
+ require "celluloid"
4
5
 
5
6
  # own dependencies
6
7
  require "rstt/version"
@@ -32,10 +33,6 @@ module Rstt
32
33
  end
33
34
  end
34
35
 
35
- def self.get_sentences
36
- @@sentences = Preprocess.split_sentences(self.content)
37
- end
38
-
39
36
  def self.build_tagging_command
40
37
  lang = get_command_language
41
38
  if LANGUAGES[lang][:utf8]
@@ -97,7 +94,7 @@ module Rstt
97
94
  p @@content
98
95
  end
99
96
 
100
- # ToDo 2012-02-25: work with `method_missing?`: DRY
97
+ # done: (2012-03-06) 2012-02-25: work with `method_missing?`: DRY
101
98
  # methods are plural @@tagged keys
102
99
  %w(words tags stems).each do |meth|
103
100
  self.define_singleton_method(meth) do
@@ -0,0 +1,2 @@
1
+ module Rstt
2
+ end
@@ -1,3 +1,3 @@
1
1
  module Rstt
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
@@ -56,40 +56,12 @@ class Config < Thor
56
56
  languages.uniq
57
57
  end
58
58
 
59
- # desc "get_workflows", "get installed workflows"
60
- # def get_workflows
61
- # puts "get workflow commands from command files"
62
- # tree_tagger_scripts = []
63
- # get_files_of_dir do |file|
64
- # tree_tagger_scripts << file
65
- # end
66
- #
67
- # tree_tagger_scripts.each do |file|
68
- # p "_____________"
69
- # p file
70
- # File.open(file).readlines.each do |line|
71
- # p line
72
- # end
73
- # p "\n"
74
- # end
75
- # end
76
-
77
59
  private
78
60
  def insert(path)
79
61
  puts "insert path .."
80
- unless File.exists?("lib/rstt/tt_settings.rb")
81
- create_file "lib/rstt/tt_settings.rb" do
82
- "module Rstt
83
- TT_HOME = \"#{path}\"
84
- end"
85
- end
86
- else
87
- insert_into_file "lib/rstt/tt_settings.rb", after: "module Rstt\n" do
88
- " TT_HOME = \"#{path}\"\n"
89
- end
62
+ insert_into_file "lib/rstt/tt_settings.rb", after: "module Rstt\n" do
63
+ " TT_HOME = \"#{path}\"\n"
90
64
  end
91
-
92
- insert_require
93
65
  end
94
66
 
95
67
  def remove
@@ -97,8 +69,6 @@ end"
97
69
  gsub_file "lib/rstt/tt_settings.rb", /^ TT_HOME = (.+)\n/ do |match|
98
70
  match = ""
99
71
  end
100
-
101
- remove_require
102
72
  end
103
73
 
104
74
  def get_path
@@ -114,25 +84,5 @@ end"
114
84
  Dir.glob(cmd_path).each do |file|
115
85
  yield file
116
86
  end
117
- # Dir.glob(tt_files).each do |file|
118
- # p file
119
- # yield file
120
- # end
121
-
122
- # Dir.entries(cmd_path).each do |file|
123
- # yield file
124
- # end
125
- end
126
-
127
- def insert_require
128
- insert_into_file "lib/rstt.rb", after: "require \"rstt/preprocess\"\n" do
129
- "require \"rstt/tt_settings\"\n"
130
- end
131
- end
132
-
133
- def remove_require
134
- gsub_file "lib/rstt.rb", "require \"rstt/tt_settings\"" do |match|
135
- match = ""
136
- end
137
87
  end
138
88
  end
@@ -18,12 +18,12 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib","bin"]
20
20
 
21
- # specify any dependencies here; for example:
22
21
  s.add_development_dependency "rspec"
23
22
  s.add_development_dependency "yard"
24
23
  s.add_development_dependency "syntax"
24
+
25
25
  s.add_runtime_dependency "thor"
26
- s.add_runtime_dependency "activesupport"
26
+ s.add_runtime_dependency "active_support"
27
27
  s.add_runtime_dependency "celluloid"
28
28
  s.add_runtime_dependency "slop"
29
29
  end
@@ -26,7 +26,7 @@ describe Rstt do
26
26
  Rstt.set_input lang: "de", content: "Das ist ein einfacher Dummy Satz."
27
27
  Rstt.print.should be_true
28
28
  end
29
- end
29
+ end # getting
30
30
 
31
31
  describe "setting" do
32
32
  before(:each) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rstt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-06 00:00:00.000000000 Z
12
+ date: 2012-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70269725598760 !ruby/object:Gem::Requirement
16
+ requirement: &70096987052060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70269725598760
24
+ version_requirements: *70096987052060
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: yard
27
- requirement: &70269725613740 !ruby/object:Gem::Requirement
27
+ requirement: &70096987051160 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70269725613740
35
+ version_requirements: *70096987051160
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: syntax
38
- requirement: &70269725612840 !ruby/object:Gem::Requirement
38
+ requirement: &70096987049840 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70269725612840
46
+ version_requirements: *70096987049840
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: thor
49
- requirement: &70269725612400 !ruby/object:Gem::Requirement
49
+ requirement: &70096987047840 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70269725612400
57
+ version_requirements: *70096987047840
58
58
  - !ruby/object:Gem::Dependency
59
- name: activesupport
60
- requirement: &70269725611800 !ruby/object:Gem::Requirement
59
+ name: active_support
60
+ requirement: &70096987046560 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70269725611800
68
+ version_requirements: *70096987046560
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: celluloid
71
- requirement: &70269725611320 !ruby/object:Gem::Requirement
71
+ requirement: &70096987045460 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70269725611320
79
+ version_requirements: *70096987045460
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: slop
82
- requirement: &70269725610860 !ruby/object:Gem::Requirement
82
+ requirement: &70096987044240 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70269725610860
90
+ version_requirements: *70096987044240
91
91
  description: another ruby wrapper for Stuttgarter Tree Tagger
92
92
  email:
93
93
  - pscholz.le@gmail.com
@@ -107,6 +107,7 @@ files:
107
107
  - bin/rstt
108
108
  - lib/rstt.rb
109
109
  - lib/rstt/preprocess.rb
110
+ - lib/rstt/tt_settings.rb
110
111
  - lib/rstt/version.rb
111
112
  - lib/tasks/config.thor
112
113
  - rstt.gemspec