tads6_robert 0.2.1 → 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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa3e05f83cd44e87656f212cf846be318c5c84f57753246a007226d38fdde7ae
4
- data.tar.gz: 89edf17478ad5287cdd34a56e49eb71a2c87849d9a14d9122aabbc8f41647c8d
3
+ metadata.gz: 53fa95eeb15ed0086511712f9142ef0112ccf8929b8d33aa0e607620ea0a7173
4
+ data.tar.gz: f3dcd96841ac4165cadd5974441edf1bb323c1a40955e3da4b883d4248981c5a
5
5
  SHA512:
6
- metadata.gz: 216b7a62c4f97077226fac1d806ba4051248da3a91488ef785f30464d04a0136755045f7d34f4770092e5429bba694a21e5da9e7b52ddaad152390cf6ed8851f
7
- data.tar.gz: c79375ad268feccaaaa762dd41edac5ae4af5ac69ab09f337c5d54167733380c9ee90422aa2652a93f7693a637fa8111be7306a569bb654fd2ce04059d67625e
6
+ metadata.gz: 63366f0787c6910cb24823f604c65ce057229a901a98952ad5e11cce8b7f7e3e10181b8e75b8899cb9b969a700f6bdd5959df2748d3612d25ac3b96a92fb3279
7
+ data.tar.gz: 41d083a1d5a13118101fb3c0438c3191e9f7d724788e0676b5dc561e9c41115718101f20096eac783cad525c5b82eee6d176ec8729fc62f9f365f2f9bd71b179
data/README.md CHANGED
@@ -1,44 +1,84 @@
1
1
  # Tads6Robert
2
2
 
3
+ Este projeto foi desenvolvido em sala de aula para demostrar o uso e aplicação de gems, para que funcionalidades sejam encapsuladas para possiveis utilizações em novas aplicações.
3
4
 
4
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/tads6_robert`. To experiment with that code, run `bin/console` for an interactive prompt.
5
+ # Instalação
5
6
 
6
- TODO: Delete this and the text above, and describe your gem
7
+ Adicione esta linha ao Gemfile do seu aplicativo:
7
8
 
8
- ## Installation
9
-
10
- Add this line to your application's Gemfile:
11
-
12
- ```ruby
9
+ ruby
13
10
  gem 'tads6_robert'
14
- ```
15
11
 
16
- And then execute:
17
12
 
18
- $ bundle
13
+ E então execute:
19
14
 
20
- Or install it yourself as:
15
+ $ bundle install
16
+
17
+ Ou instale você mesmo como:
21
18
 
22
19
  $ gem install tads6_robert
23
20
 
24
- ## Usage
21
+ # Como Utilizar
22
+
23
+ Siga os seguintes passos para utilizar a gem.
24
+
25
+ # Require necessário
26
+ require 'tads6robert'
27
+
28
+ # Sua classe deve herdar a classe Tads6Robert::ORM
29
+ class ExemploClasse < Tads6Robert::ORM
30
+ # Toda classe deve conter um :ID obrigatoriamente
31
+ attr_accessor :id, :modelo
32
+
33
+ # O construtor deve seguir o exemplo abaixo
34
+ def initialize(hash)
35
+ @titulo = hash.first[:modelo]
36
+ end
37
+
38
+ # Este método deve ser reescrito obrigatoriamente com o caminho para seu banco de dados 'db/nomedaclasseminúsculo'
39
+ def self.path
40
+ 'local/onde/deseja/salvar/os/dados'
41
+ end
42
+
43
+ #Passo a Passo
44
+
45
+ Crie o diretório com o caminho especificado no método self.path
46
+ Criar um novo registro:
47
+
48
+ ExemploClasse.criar(
49
+ modelo: 'corsa mil'
50
+ )
51
+
52
+ #Listar todos os registros:
53
+
54
+ puts ExemploClasse.listar
55
+
56
+ Selecionar um registro específico
57
+
58
+ puts ExemploClasse.selecionar(1)
25
59
 
26
- TODO: Write usage instructions here
60
+ #Atualizar um registro específico
27
61
 
28
- ## Development
62
+ carro = ExemploClasse.selecionar(1)
63
+ carro.modelo = "modelo novo"
64
+ ExemploClasse.atualizar(carro)
29
65
 
30
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
66
+ # Remover um registro específico
31
67
 
32
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
68
+ ExemploClasse.remove(1)
33
69
 
34
- ## Contributing
70
+ # Importante
35
71
 
36
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tads6_robert. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
72
+ O atributo id deve estar contido, contudo ele não deve ser inicializado.
73
+ O método path obrigatoriamente deve ser reescrito para o local onde você deseja salvar os dados
37
74
 
38
- ## License
75
+ def self.path
76
+ 'local/onde/deseja/salvar/os/dados'
77
+ end
39
78
 
40
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
79
+ # Licença
41
80
 
42
- ## Code of Conduct
81
+ A gem está disponível como código aberto sob os termos do MIT License.
82
+ Código de Conduta
43
83
 
44
- Everyone interacting in the Tads6Robert project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/treborx/tads6_robert/blob/master/CODE_OF_CONDUCT.md).
84
+ Espera-se que todos que interagem nas bases de código do projeto Tads6Robert.
@@ -1,3 +1,3 @@
1
1
  module Tads6Robert
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
data/tads6_robert.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Robert Santos"]
10
10
  spec.email = ["robert218.rs@gmail.com"]
11
11
 
12
- spec.summary = "Gem para ORM para aulas de Tópicos especiais de TI - IFMS "
12
+ spec.summary = "Gem para Mapeamento Objeto Relacional"
13
13
  spec.description = "Gem para ORM para aulas de Tópicos especiais de TI - IFMS "
14
14
  spec.homepage = "http://www.ifms.edu.br"
15
15
  spec.license = "MIT"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tads6_robert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Santos
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-02 00:00:00.000000000 Z
11
+ date: 2018-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -98,5 +98,5 @@ rubyforge_project:
98
98
  rubygems_version: 2.7.7
99
99
  signing_key:
100
100
  specification_version: 4
101
- summary: Gem para ORM para aulas de Tópicos especiais de TI - IFMS
101
+ summary: Gem para Mapeamento Objeto Relacional
102
102
  test_files: []