tads6_patrick 1.1.4 → 1.2.4

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: 0213c6a0e2067ef444e2a545fdebbf15fff3a674cf1d4f6ee59a6a0bfe0e4ce4
4
- data.tar.gz: e7c344c6fb6900bb9b0fc5a37f76a5c936b9e57d1a4702b51756c7443ff44ac9
3
+ metadata.gz: 78638f8152ee2dc7c12b598534b02edb8a5ed47e31163a756cad58ee8a4d27fb
4
+ data.tar.gz: adb052524687c43b0651798174b4aa485028c53ca1e91c80d4ef66a0e3e97e6b
5
5
  SHA512:
6
- metadata.gz: 9f81857be14c4a1abf4d964a8a0c7e4c198c5de1ce6b56d2126a4b53a76d4e2a8b9a46ef14aedc310c1736606a05ffc59b94def9fceb9ba96c8b04affa5e42b6
7
- data.tar.gz: c3a3c1ae96930bee8ae23fbfeea064bb5a010aea5f199e9a89ad336513218e78db99d0c0d6c653001f002f254132972acc6f92a9a0979b01285134f962aa5478
6
+ metadata.gz: f327588907027309cab869353fde85a677f6c3abf178329e26b93374a3af9953d9a77cf3a81361620fd6b99878c4162041fc86bcda377d671c3a0f460a88dfb9
7
+ data.tar.gz: afbfba1396407b6eabf3f7ca83bfea2dbf80b4153bdf82eef34b75f8e1170d7130e1503c581db05898d9ee82930e046800aac400d836a37b000f2a19fb1e0aaf
data/README.md CHANGED
@@ -1,43 +1,106 @@
1
1
  # Tads6Patrick
2
2
 
3
- 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_patrick`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Seja bem vindo ao tads6_patrick, gem para auxilia-lo na serialização e desserialização de objetos! Para tanto, a gem lhe desponibila uma biblioteca básica com CRUD.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ Segue abaixo, as instruções de instalação e uso desta gem.
6
6
 
7
- ## Installation
7
+ ## Instalação
8
8
 
9
- Add this line to your application's Gemfile:
9
+ Adicione esta linha em seu aplicativo de Gemfile:
10
10
 
11
11
  ```ruby
12
12
  gem 'tads6_patrick'
13
13
  ```
14
14
 
15
- And then execute:
15
+ E então execute:
16
16
 
17
17
  $ bundle
18
18
 
19
- Or install it yourself as:
19
+ Ou instale com:
20
20
 
21
21
  $ gem install tads6_patrick
22
22
 
23
- ## Usage
23
+ ## Como Usar - Parte 1
24
24
 
25
- TODO: Write usage instructions here
25
+ Após instalada a gem, o próximo passo é ir no arquivo o qual se tem a necessidade de uso da biblioteca, e digitar o seguinte comando no topo deste:
26
26
 
27
- ## Development
27
+ ```ruby
28
+ require 'tads6_patrick'
29
+ ```
30
+
31
+ No próximo passo, se deve atribuir por herança em nossa classe, O nome do modulo e biblioteca `Tads6Patrick::ORM`.
32
+ Veja abaixo como deve estar nosso arquivo.
33
+
34
+ ```ruby
35
+ require 'tads6_patrick'
36
+ class Bolo < Tads6Patrick::ORM
37
+ end
38
+ ```
39
+ Só com o código disposto acima, ainda não temos o programa funcional. Para que funcione, é necessário ter uma `id` e `initializable`.
40
+
41
+ ```ruby
42
+ require 'tads6_patrick'
43
+ class Bolo < Tads6Patrick::ORM
44
+ attr_accessor :id, :titulo
45
+ def initialize(atributos)
46
+ @titulo = atributos.first[:titulo]
47
+ end
48
+ end
49
+ ```
50
+ ## Como Usar - Parte 2: CRUD
51
+
52
+ Para o satisfatório uso da biblioteca, esta tem disponível de forma fácil, as 4 operações do CRUD.
53
+ * Criar
54
+ * Listar
55
+ * Selecionar
56
+ * Atualizar
57
+ * Excluir
58
+
59
+ Segue exemplo para cada caso:
60
+
61
+ ###Criar
62
+ ```ruby
63
+ Bolo.criar(titulo:'Formigueiro')
64
+ ```
65
+
66
+ ###Listar
67
+ ```ruby
68
+ Bolo.listar
69
+ ```
70
+ ###Selecionar
71
+ ```ruby
72
+ Bolo.selecionar(n)
73
+ ```
74
+ No exemplo acima, `n` corresponde ao id que queremos selecionar.
75
+
76
+ ###Atualizar
77
+ ```ruby
78
+ bolo = Bolo.selecionar(1)
79
+ bolo.titulo = "Quatro Leites"
80
+ Bolo.atualizar(bolo)
81
+ ```
82
+ No caso acima, o atualizar é dependente do selecionar, uma vez selecionada a classe, modificamos seu atributo, para então em seguida, atualizar a classe.
83
+
84
+ ###Deletar
85
+ ```ruby
86
+ Bolo.deletar(n)
87
+ ```
88
+ Acima temos o bolo do id `n` excluido.
89
+
90
+ ## Desenvolvimento
28
91
 
29
- 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.
92
+ Depois de verificar o repositório, execute o `bin / setup` para instalar dependências. Então, execute `rake spec` para executar os testes. Você também pode executar o `bin / console` para um prompt interativo que permitirá que você experimente.
30
93
 
31
- 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).
94
+ Para instalar esta gem na sua máquina local, execute `bundle exec rake install`. Para liberar uma nova versão, atualize o número da versão em `version.rb`, e então execute` bundle exec rake release`, que irá criar uma tag git para a versão, push commits git e tags, e pressionar o arquivo `.gem` arquivo para [rubygems.org] (https://rubygems.org).
32
95
 
33
- ## Contributing
96
+ ## Contribuição
34
97
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[PatrickMendC]/tads6_patrick. 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.
98
+ Relatórios de bugs e pedidos de pull são bem-vindos no GitHub em https://github.com/[PatrickMendC]/tads6_patrick. Porém, o presente projeto destina-se a ser material de avaliação pelo professor da disciplina de Frameworks.
36
99
 
37
- ## License
100
+ ## Licença
38
101
 
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
102
+ A gem está disponível como código aberto sob os termos da [MIT License](https://opensource.org/licenses/MIT).
40
103
 
41
- ## Code of Conduct
104
+ ## Codigo de Conduta
42
105
 
43
106
  Everyone interacting in the Tads6Patrick project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/tads6_patrick/blob/master/CODE_OF_CONDUCT.md).
@@ -1,3 +1,3 @@
1
1
  module Tads6Patrick
2
- VERSION = "1.1.4"
2
+ VERSION = "1.2.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tads6_patrick
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Mendes Cordeiro