bovespa_ingestion 0.2.0 → 0.3.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 +8 -8
- data/Gemfile +1 -2
- data/Rakefile +2 -30
- data/bovespa_ingestion.gemspec +19 -83
- data/config/environment.rb +7 -9
- data/lib/historico_ativos/version.rb +3 -0
- data/lib/historico_ativos.rb +1 -0
- metadata +5 -35
- data/.travis.yml +0 -7
- data/VERSION +0 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
Y2Q0YTExYjdlOTU5NWUyODZkMjYyZTIxNzZmMmRhNzlhNzg5ZTY0Nw==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
OTU0ZDhhZTQ5MzY4ZDI0NmY5ZTBkNzZmNThjYzFkZTVhOGZhNTUzMw==
|
|
7
7
|
!binary "U0hBNTEy":
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
MDk3YjEzYjAxZjAxN2M0MzEwYTgxOTEyYTE5MzY1NTVkMDkzY2IwODIyZjQ5
|
|
10
|
+
ZDExZTFjZTE0YjgxYzYzYWRjOGUxNjU1N2Q0OWMzMDg4ZmQ3OTk5MjY5OWVj
|
|
11
|
+
NjFkNjVlOWU3NjdlYTM2ZTY3YjlhMzU3YjdhYjc4ZDgzOTc3MmE=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
NGYxY2U2MWJjODkyZDNhN2I5MzEyYTNmODI0ODdhZDFkNzk4MzAyYTE2YTk4
|
|
14
|
+
MTc1NDU4NDFlNTUyNmEwZmFiYTk5ODQ5NDg0NDllZjU5N2NlZDAyODc5YTZj
|
|
15
|
+
YTYwMWViYjNiMGRjZTkxYTQ3ZGNjNDhiZTllMzI2NzA0MDI3YzM=
|
data/Gemfile
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
|
+
gem 'rake'
|
|
3
4
|
gem 'activerecord', ">=3"
|
|
4
5
|
gem 'standalone_migrations'
|
|
5
6
|
|
|
6
7
|
group :development do
|
|
7
8
|
gem 'pg'
|
|
8
|
-
gem 'jeweler', "~> 1.6.4"
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
group :test do
|
|
12
|
-
gem 'rake'
|
|
13
12
|
gem 'rspec', "~>2"
|
|
14
13
|
gem 'sqlite3'
|
|
15
14
|
end
|
data/Rakefile
CHANGED
|
@@ -8,26 +8,8 @@ rescue Bundler::BundlerError => e
|
|
|
8
8
|
exit e.status_code
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
rescue LoadError => e
|
|
14
|
-
puts "gem install standalone_migrations to get db:migrate:* tasks! (Error: #{e})"
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
require 'jeweler'
|
|
18
|
-
Jeweler::Tasks.new do |gem|
|
|
19
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
|
20
|
-
gem.name = "bovespa_ingestion"
|
|
21
|
-
gem.homepage = "http://github.com/seixasfelipe/bovespa_ingestion"
|
|
22
|
-
gem.license = "MIT"
|
|
23
|
-
gem.summary = "An importer of historical stock quotations from BM&F Bovespa"
|
|
24
|
-
gem.description = "An importer of historical stock quotations from BM&F Bovespa. It reads historical files of daily stock quotations, parses each line and inserts into database for future use."
|
|
25
|
-
gem.email = "seixasfelipe@gmail.com"
|
|
26
|
-
gem.authors = ["Felipe Seixas", "Rodrigo Fraga"]
|
|
27
|
-
gem.executables = ['carregar_historico']
|
|
28
|
-
# dependencies defined in Gemfile
|
|
29
|
-
end
|
|
30
|
-
Jeweler::RubygemsDotOrgTasks.new
|
|
11
|
+
require 'standalone_migrations'
|
|
12
|
+
StandaloneMigrations::Tasks.load_tasks
|
|
31
13
|
|
|
32
14
|
require 'rspec/core/rake_task'
|
|
33
15
|
RSpec::Core::RakeTask.new :rspec do |t|
|
|
@@ -36,13 +18,3 @@ RSpec::Core::RakeTask.new :rspec do |t|
|
|
|
36
18
|
end
|
|
37
19
|
|
|
38
20
|
task default: :rspec
|
|
39
|
-
|
|
40
|
-
require 'rake/task'
|
|
41
|
-
Rake::RDocTask.new do |rdoc|
|
|
42
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
|
43
|
-
|
|
44
|
-
rdoc.rdoc_dir = 'rdoc'
|
|
45
|
-
rdoc.title = "bovespa_ingestion #{version}"
|
|
46
|
-
rdoc.rdoc_files.include('README*')
|
|
47
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
48
|
-
end
|
data/bovespa_ingestion.gemspec
CHANGED
|
@@ -1,87 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
|
-
# -*- encoding: utf-8 -*-
|
|
5
|
-
|
|
6
|
-
Gem::Specification.new do |s|
|
|
7
|
-
s.name = "bovespa_ingestion"
|
|
8
|
-
s.version = "0.2.0"
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
|
|
2
|
+
require 'historico_ativos/version'
|
|
9
3
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
s.
|
|
13
|
-
s.description
|
|
14
|
-
s.
|
|
15
|
-
s.
|
|
16
|
-
s.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
]
|
|
20
|
-
s.files
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"README.md",
|
|
26
|
-
"Rakefile",
|
|
27
|
-
"VERSION",
|
|
28
|
-
"archives/SeriesHistoricas_Layout.pdf",
|
|
29
|
-
"bin/carregar_historico",
|
|
30
|
-
"bovespa_ingestion.gemspec",
|
|
31
|
-
"config/database.yml",
|
|
32
|
-
"config/environment.rb",
|
|
33
|
-
"db/migrate/20111221001450_create_historico.rb",
|
|
34
|
-
"db/migrate/20111222192119_create_ativos.rb",
|
|
35
|
-
"db/migrate/20111223004105_change_ativos.rb",
|
|
36
|
-
"db/migrate/20111223023840_add_quantidade_ativos_to_historico_ativos.rb",
|
|
37
|
-
"db/migrate/20111223131703_add_prazo_termo_to_ativo.rb",
|
|
38
|
-
"db/migrate/20111223213342_alter_reference_historico_ativo.rb",
|
|
39
|
-
"db/migrate/20111223214919_remove_data_importacao.rb",
|
|
40
|
-
"db/schema.rb",
|
|
41
|
-
"lib/historico_ativos.rb",
|
|
42
|
-
"lib/historico_ativos/ativo.rb",
|
|
43
|
-
"lib/historico_ativos/carrega_historico.rb",
|
|
44
|
-
"lib/historico_ativos/header.rb",
|
|
45
|
-
"lib/historico_ativos/historico.rb",
|
|
46
|
-
"lib/historico_ativos/parser_ativo.rb",
|
|
47
|
-
"lib/historico_ativos/parser_header.rb",
|
|
48
|
-
"lib/historico_ativos/parser_trailer.rb",
|
|
49
|
-
"lib/historico_ativos/trailer.rb",
|
|
50
|
-
"sample/DemoCotacoesHistoricas12022003.txt",
|
|
51
|
-
"sample/sample_cota_hist_2003.txt",
|
|
52
|
-
"spec/historico_ativos/ativo_spec.rb",
|
|
53
|
-
"spec/historico_ativos/carrega_historico_spec.rb",
|
|
54
|
-
"spec/historico_ativos/historico_spec.rb",
|
|
55
|
-
"spec/historico_ativos/parser_ativo_spec.rb",
|
|
56
|
-
"spec/historico_ativos/parser_header_spec.rb",
|
|
57
|
-
"spec/historico_ativos/parser_trailer_spec.rb",
|
|
58
|
-
"spec/spec_helper.rb"
|
|
59
|
-
]
|
|
60
|
-
s.homepage = "http://github.com/seixasfelipe/bovespa_ingestion"
|
|
61
|
-
s.licenses = ["MIT"]
|
|
62
|
-
s.require_paths = ["lib"]
|
|
63
|
-
s.rubygems_version = "2.0.3"
|
|
64
|
-
s.summary = "An importer of historical stock quotations from BM&F Bovespa"
|
|
65
|
-
|
|
66
|
-
if s.respond_to? :specification_version then
|
|
67
|
-
s.specification_version = 4
|
|
4
|
+
# -*- encoding: utf-8 -*-
|
|
5
|
+
Gem::Specification.new 'bovespa_ingestion', HistoricoAtivos::VERSION do |s|
|
|
6
|
+
s.summary = "An importer of historical stock quotations from BM&F Bovespa"
|
|
7
|
+
s.description = "It reads historical files of daily stock quotations, parses each line and inserts into database for future use."
|
|
8
|
+
s.date = "2013-05-27"
|
|
9
|
+
s.authors = ["Felipe Seixas", "Rodrigo Fraga"]
|
|
10
|
+
s.email = "seixasfelipe@gmail.com"
|
|
11
|
+
s.homepage = "http://github.com/seixasfelipe/bovespa_ingestion"
|
|
12
|
+
s.executables = ["carregar_historico"]
|
|
13
|
+
s.files = `git ls-files`.split("\n") - %w[.gitignore .travis.yml]
|
|
14
|
+
s.test_files = s.files.select { |p| p =~ /^test\/.*_test.rb/ }
|
|
15
|
+
s.extra_rdoc_files = s.files.select { |p| p =~ /^README/ } << 'LICENSE'
|
|
16
|
+
s.licenses = ["MIT"]
|
|
17
|
+
s.require_paths = ["lib"]
|
|
18
|
+
s.rubygems_version = "2.0.3"
|
|
68
19
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
s.add_runtime_dependency(%q<standalone_migrations>, [">= 0"])
|
|
72
|
-
s.add_development_dependency(%q<pg>, [">= 0"])
|
|
73
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
|
74
|
-
else
|
|
75
|
-
s.add_dependency(%q<activerecord>, [">= 3"])
|
|
76
|
-
s.add_dependency(%q<standalone_migrations>, [">= 0"])
|
|
77
|
-
s.add_dependency(%q<pg>, [">= 0"])
|
|
78
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
|
79
|
-
end
|
|
80
|
-
else
|
|
81
|
-
s.add_dependency(%q<activerecord>, [">= 3"])
|
|
82
|
-
s.add_dependency(%q<standalone_migrations>, [">= 0"])
|
|
83
|
-
s.add_dependency(%q<pg>, [">= 0"])
|
|
84
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
|
85
|
-
end
|
|
20
|
+
s.add_dependency 'activerecord', '>= 3'
|
|
21
|
+
s.add_dependency 'standalone_migrations'
|
|
86
22
|
end
|
|
87
23
|
|
data/config/environment.rb
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
require 'active_record'
|
|
2
|
-
require '
|
|
2
|
+
require 'rails'
|
|
3
|
+
require 'standalone_migrations'
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
ENV[
|
|
5
|
+
if !ENV["RAILS_ENV"]
|
|
6
|
+
ENV["RAILS_ENV"] = ENV["DB"] || ENV["RACK_ENV"] || Rails.env || "development"
|
|
7
|
+
end
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
ActiveRecord::Base.establish_connection(
|
|
11
|
-
db_config[ENV['APP_ENV']]
|
|
12
|
-
)
|
|
9
|
+
configuration = StandaloneMigrations::MinimalRailtieConfig.config.database_configuration[Rails.env]
|
|
10
|
+
ActiveRecord::Base.establish_connection(configuration)
|
|
13
11
|
|
data/lib/historico_ativos.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bovespa_ingestion
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Felipe Seixas
|
|
@@ -39,52 +39,21 @@ dependencies:
|
|
|
39
39
|
- - ! '>='
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
41
|
version: '0'
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
|
45
|
-
requirements:
|
|
46
|
-
- - ! '>='
|
|
47
|
-
- !ruby/object:Gem::Version
|
|
48
|
-
version: '0'
|
|
49
|
-
type: :development
|
|
50
|
-
prerelease: false
|
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
52
|
-
requirements:
|
|
53
|
-
- - ! '>='
|
|
54
|
-
- !ruby/object:Gem::Version
|
|
55
|
-
version: '0'
|
|
56
|
-
- !ruby/object:Gem::Dependency
|
|
57
|
-
name: jeweler
|
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
|
59
|
-
requirements:
|
|
60
|
-
- - ~>
|
|
61
|
-
- !ruby/object:Gem::Version
|
|
62
|
-
version: 1.6.4
|
|
63
|
-
type: :development
|
|
64
|
-
prerelease: false
|
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
66
|
-
requirements:
|
|
67
|
-
- - ~>
|
|
68
|
-
- !ruby/object:Gem::Version
|
|
69
|
-
version: 1.6.4
|
|
70
|
-
description: An importer of historical stock quotations from BM&F Bovespa. It reads
|
|
71
|
-
historical files of daily stock quotations, parses each line and inserts into database
|
|
72
|
-
for future use.
|
|
42
|
+
description: It reads historical files of daily stock quotations, parses each line
|
|
43
|
+
and inserts into database for future use.
|
|
73
44
|
email: seixasfelipe@gmail.com
|
|
74
45
|
executables:
|
|
75
46
|
- carregar_historico
|
|
76
47
|
extensions: []
|
|
77
48
|
extra_rdoc_files:
|
|
78
|
-
- LICENSE
|
|
79
49
|
- README.md
|
|
50
|
+
- LICENSE
|
|
80
51
|
files:
|
|
81
52
|
- .standalone_migrations
|
|
82
|
-
- .travis.yml
|
|
83
53
|
- Gemfile
|
|
84
54
|
- LICENSE
|
|
85
55
|
- README.md
|
|
86
56
|
- Rakefile
|
|
87
|
-
- VERSION
|
|
88
57
|
- archives/SeriesHistoricas_Layout.pdf
|
|
89
58
|
- bin/carregar_historico
|
|
90
59
|
- bovespa_ingestion.gemspec
|
|
@@ -107,6 +76,7 @@ files:
|
|
|
107
76
|
- lib/historico_ativos/parser_header.rb
|
|
108
77
|
- lib/historico_ativos/parser_trailer.rb
|
|
109
78
|
- lib/historico_ativos/trailer.rb
|
|
79
|
+
- lib/historico_ativos/version.rb
|
|
110
80
|
- sample/DemoCotacoesHistoricas12022003.txt
|
|
111
81
|
- sample/sample_cota_hist_2003.txt
|
|
112
82
|
- spec/historico_ativos/ativo_spec.rb
|
data/.travis.yml
DELETED
data/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.2.0
|