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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTA2Y2Q3OThkMzBiNzJhZGYyYTQ3YmMwZGQxOWYxOWZhZmJhMTMwMQ==
4
+ Y2Q0YTExYjdlOTU5NWUyODZkMjYyZTIxNzZmMmRhNzlhNzg5ZTY0Nw==
5
5
  data.tar.gz: !binary |-
6
- OTg4MWZhZDc1YzQxOGQyNTQ5ODQ4ODhkN2Y2Mzk4NmQ5NTIyNWM3Zg==
6
+ OTU0ZDhhZTQ5MzY4ZDI0NmY5ZTBkNzZmNThjYzFkZTVhOGZhNTUzMw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MTJiMTU0NTE3OTFjNmEyNTVjYzliNTY3MWU1MjZjOTIxZGEwYzk5YzRjOTBm
10
- YzEwODNhMWIzYzM5YTM4ODEzYjE2YjI2NjgyOWU5MDc5ZDhlZTI3OGJiMGRk
11
- YTIxZjNlMjAzNDExYTcyZjdiZGIxNmZjMDgyNWVhMDg4Mjk0Zjk=
9
+ MDk3YjEzYjAxZjAxN2M0MzEwYTgxOTEyYTE5MzY1NTVkMDkzY2IwODIyZjQ5
10
+ ZDExZTFjZTE0YjgxYzYzYWRjOGUxNjU1N2Q0OWMzMDg4ZmQ3OTk5MjY5OWVj
11
+ NjFkNjVlOWU3NjdlYTM2ZTY3YjlhMzU3YjdhYjc4ZDgzOTc3MmE=
12
12
  data.tar.gz: !binary |-
13
- NzZkYzFhZTljOGFlODhlZDhkMmE4ODY0NTIxOGE4Nzc1NzQ4MTRhNDgzMGMx
14
- OWYwODMwYzkxZjcwZmQwMjIzMTkyZGQ0YjdjNDVlMGU5YmIwZWU1MmMzOTdj
15
- YmZjMGJiM2ZmYzhjZDJjNDU3MzA3OTkzMTdiZWY4MzE2MDllMTg=
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
- begin
12
- require 'tasks/standalone_migrations'
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
@@ -1,87 +1,23 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
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
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Felipe Seixas", "Rodrigo Fraga"]
12
- s.date = "2013-05-27"
13
- s.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."
14
- s.email = "seixasfelipe@gmail.com"
15
- s.executables = ["carregar_historico"]
16
- s.extra_rdoc_files = [
17
- "LICENSE",
18
- "README.md"
19
- ]
20
- s.files = [
21
- ".standalone_migrations",
22
- ".travis.yml",
23
- "Gemfile",
24
- "LICENSE",
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
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
70
- s.add_runtime_dependency(%q<activerecord>, [">= 3"])
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
 
@@ -1,13 +1,11 @@
1
1
  require 'active_record'
2
- require 'yaml'
2
+ require 'rails'
3
+ require 'standalone_migrations'
3
4
 
4
- # by default, app environment is development
5
- ENV['APP_ENV'] ||= 'development'
5
+ if !ENV["RAILS_ENV"]
6
+ ENV["RAILS_ENV"] = ENV["DB"] || ENV["RACK_ENV"] || Rails.env || "development"
7
+ end
6
8
 
7
- config_path = ::File.expand_path('../../config/database.yml', __FILE__)
8
- db_config = YAML.load_file(config_path)
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
 
@@ -0,0 +1,3 @@
1
+ module HistoricoAtivos
2
+ VERSION = '0.3.0'
3
+ end
@@ -7,3 +7,4 @@ require 'historico_ativos/parser_trailer'
7
7
  require 'historico_ativos/header'
8
8
  require 'historico_ativos/historico'
9
9
  require 'historico_ativos/trailer'
10
+
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.2.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
- - !ruby/object:Gem::Dependency
43
- name: pg
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
@@ -1,7 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 1.9.3
4
- env:
5
- - APP_ENV=test
6
- before_script:
7
- - rake db:migrate
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.0