New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'init' implementation. #91

Merged
merged 3 commits into from Mar 24, 2016

Conversation

Projects
None yet
3 participants
@noffle
Contributor

noffle commented Mar 19, 2016

This implements most of the IPFS initialization steps:

  • check for repo existance
  • generate new peer id
  • generate + write config
  • write version
  • add default assets to the repo
  • pin default assets to the repo
  • set + publish IPNS record

@noffle noffle added the needs review label Mar 19, 2016

@noffle

This comment has been minimized.

Show comment
Hide comment
@noffle

noffle Mar 19, 2016

Contributor

Depends on ipfs/js-ipfs-repo#30 getting merged to pass tests / work.

Contributor

noffle commented Mar 19, 2016

Depends on ipfs/js-ipfs-repo#30 getting merged to pass tests / work.

@diasdavid

This comment has been minimized.

Show comment
Hide comment
@diasdavid

diasdavid Mar 20, 2016

Member

Thank you @noffle! :D This is great. I've made some comments, seems like we need to get the files branch merged in order to unlock add default assets to the repo. Working on that right away.

Note: I broke add + pin default assets to the repo into two items.

Member

diasdavid commented Mar 20, 2016

Thank you @noffle! :D This is great. I've made some comments, seems like we need to get the files branch merged in order to unlock add default assets to the repo. Working on that right away.

Note: I broke add + pin default assets to the repo into two items.

@diasdavid diasdavid referenced this pull request Mar 20, 2016

Closed

Sprint: March 7-20 #97

@diasdavid diasdavid removed the needs review label Mar 20, 2016

@diasdavid

This comment has been minimized.

Show comment
Hide comment
@diasdavid

diasdavid Mar 21, 2016

Member

@noffle, I've merged #67 so that you are not blocked for add default assets to the repo. Once that is done, let's merge this PR as well.

Member

diasdavid commented Mar 21, 2016

@noffle, I've merged #67 so that you are not blocked for add default assets to the repo. Once that is done, let's merge this PR as well.

@noffle noffle changed the title from Basic 'init' implementation. to 'init' implementation. Mar 22, 2016

@noffle

This comment has been minimized.

Show comment
Hide comment
@noffle

noffle Mar 22, 2016

Contributor

The latest batch of commits includes the default assets for Node-only, and tests.

Contributor

noffle commented Mar 22, 2016

The latest batch of commits includes the default assets for Node-only, and tests.

@noffle noffle added the needs review label Mar 22, 2016

} else {
return true
}
return !(key.endsWith('-node.js') || key.endsWith('-node'))

This comment has been minimized.

@diasdavid

diasdavid Mar 22, 2016

Member

👍

@diasdavid
@@ -27,8 +27,7 @@ describe('core', () => {
const tests = fs.readdirSync(__dirname)
tests.filter((file) => {
if (file === 'index.js' ||
file === 'browser.js' ||
file === 'test-swarm-browser.js') {
file.endsWith('browser.js')) {

This comment has been minimized.

@diasdavid

diasdavid Mar 22, 2016

Member

👍

@diasdavid
const IPFS = require('../../src/core')
const IPFSRepo = require('ipfs-repo')
function createTestRepo () {

This comment has been minimized.

@diasdavid

diasdavid Mar 22, 2016

Member

It would be pretty sweet to grab this func and also the logic to 'inject' a go-ipfs repo (found in index.js and browser.js) and make a utils file that can be used across tests that can 'create and teardown a go-ipfs generated repo' and 'create and teardown a fresh baked repo.

Would you like to make it on this PR too @noffle ?

@diasdavid

diasdavid Mar 22, 2016

Member

It would be pretty sweet to grab this func and also the logic to 'inject' a go-ipfs repo (found in index.js and browser.js) and make a utils file that can be used across tests that can 'create and teardown a go-ipfs generated repo' and 'create and teardown a fresh baked repo.

Would you like to make it on this PR too @noffle ?

This comment has been minimized.

@noffle

noffle Mar 22, 2016

Contributor

Let's make it in another, since this one is already getting big. Created #95.

@noffle

noffle Mar 22, 2016

Contributor

Let's make it in another, since this one is already getting big. Created #95.

const IPFS = require('../../src/core')
const IPFSRepo = require('ipfs-repo')
function createTestRepo () {

This comment has been minimized.

@diasdavid

diasdavid Mar 22, 2016

Member

following the comment above, this duplication of code would be mitigated :)

@diasdavid

diasdavid Mar 22, 2016

Member

following the comment above, this duplication of code would be mitigated :)

@noffle

This comment has been minimized.

Show comment
Hide comment
@noffle

noffle Mar 22, 2016

Contributor

FYI, I still need to add the CLI and HTTP routes & tests.

Contributor

noffle commented Mar 22, 2016

FYI, I still need to add the CLI and HTTP routes & tests.

@diasdavid

This comment has been minimized.

Show comment
Hide comment
@diasdavid

diasdavid Mar 22, 2016

Member

Excellent @noffle ! This is awesome. Made a request in one of the comments, let me know if you would like do it for this PR.

Either way, let's squash all commits before the merge, please :)

Member

diasdavid commented Mar 22, 2016

Excellent @noffle ! This is awesome. Made a request in one of the comments, let me know if you would like do it for this PR.

Either way, let's squash all commits before the merge, please :)

@diasdavid

This comment has been minimized.

Show comment
Hide comment
@diasdavid

diasdavid Mar 22, 2016

Member

re: #91 (comment)

Sounds good :)

Member

diasdavid commented Mar 22, 2016

re: #91 (comment)

Sounds good :)

@noffle

This comment has been minimized.

Show comment
Hide comment
@noffle

noffle Mar 22, 2016

Contributor

Big 'ol rebase!

Contributor

noffle commented Mar 22, 2016

Big 'ol rebase!

@noffle

This comment has been minimized.

Show comment
Hide comment
@noffle

noffle Mar 24, 2016

Contributor

Clarification: I'm going to add HTTP/CLI in another PR; it's more work than I expected!

Contributor

noffle commented Mar 24, 2016

Clarification: I'm going to add HTTP/CLI in another PR; it's more work than I expected!

@diasdavid

This comment has been minimized.

Show comment
Hide comment
@diasdavid

diasdavid Mar 24, 2016

Member

LGTM, going to merge :)

Member

diasdavid commented Mar 24, 2016

LGTM, going to merge :)

@diasdavid diasdavid merged commit da03761 into ipfs:master Mar 24, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@diasdavid diasdavid removed the needs review label Mar 24, 2016

@noffle noffle referenced this pull request Apr 6, 2016

Merged

Added 009! #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment